Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wire up cred-ex deletion; delete calls take HTTP DELETE methods #747

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions aries_cloudagent/config/tests/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ async def test_wallet_config_existing_replace(self):

await test_module.wallet_config(context, provision=True)

async def test_wallet_config_non_indy_x(self):
settings = {
"wallet.seed": "00000000000000000000000000000000",
}
mock_wallet = async_mock.MagicMock(
type="not-indy",
name="Test Wallet",
created=False,
get_public_did=async_mock.CoroutineMock(
return_value=async_mock.MagicMock(did=TEST_DID, verkey=TEST_VERKEY)
),
)
context = InjectionContext(settings=settings, enforce_typing=False)
context.injector.bind_instance(BaseWallet, mock_wallet)

with self.assertRaises(test_module.ConfigError):
await test_module.wallet_config(context, provision=True)

async def test_wallet_config_bad_seed_x(self):
settings = {
"wallet.seed": "00000000000000000000000000000000",
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/holder/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ async def register(app: web.Application):
credentials_attr_mime_types_get,
allow_head=False,
),
web.post("/credential/{credential_id}/remove", credentials_remove),
web.delete("/credential/{credential_id}", credentials_remove),
web.get("/credentials", credentials_list, allow_head=False),
]
)
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/protocols/connections/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ async def register(app: web.Application):
"/connections/{conn_id}/establish-inbound/{ref_id}",
connections_establish_inbound,
),
web.post("/connections/{conn_id}/remove", connections_remove),
web.delete("/connections/{conn_id}", connections_remove),
]
)

Expand Down
4 changes: 4 additions & 0 deletions aries_cloudagent/protocols/issue_credential/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,10 @@ async def register(app: web.Application):
"/issue-credential/records/{cred_ex_id}/problem-report",
credential_exchange_problem_report,
),
web.delete(
"/issue-credential/records/{cred_ex_id}",
credential_exchange_remove,
),
]
)

Expand Down
4 changes: 2 additions & 2 deletions aries_cloudagent/protocols/present_proof/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,8 @@ async def register(app: web.Application):
"/present-proof/records/{pres_ex_id}/verify-presentation",
presentation_exchange_verify_presentation,
),
web.post(
"/present-proof/records/{pres_ex_id}/remove",
web.delete(
"/present-proof/records/{pres_ex_id}",
presentation_exchange_remove,
),
]
Expand Down