Skip to content

Commit

Permalink
Oops removed too many tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Costanzo <[email protected]>
  • Loading branch information
ianco committed Sep 1, 2021
1 parent 83b8381 commit 42fadfb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions aries_cloudagent/protocols/present_proof/v1_0/tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,22 @@ async def test_presentation_exchange_verify_presentation(self):
)
mock_response.assert_called_once_with({"thread_id": "sample-thread-id"})

async def test_presentation_exchange_verify_presentation_px_rec_not_found(self):
self.request.json = async_mock.CoroutineMock(return_value={"trace": False})
self.request.match_info = {"pres_ex_id": "dummy"}

with async_mock.patch.object(
test_module.V10PresentationExchange,
"retrieve_by_id",
async_mock.CoroutineMock(),
) as mock_retrieve:
mock_retrieve.side_effect = StorageNotFoundError("no such record")
with self.assertRaises(test_module.web.HTTPNotFound) as context:
await test_module.presentation_exchange_verify_presentation(
self.request
)
assert "no such record" in str(context.exception)

async def test_presentation_exchange_verify_presentation_bad_state(self):
self.request.json = async_mock.CoroutineMock()
self.request.match_info = {"pres_ex_id": "dummy"}
Expand Down

0 comments on commit 42fadfb

Please sign in to comment.