Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodolfo Miranda committed Aug 3, 2023
1 parent bee6e09 commit 9423f53
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/app/test_credentialing.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,26 @@ def test_credentialing_ends(helpers, seeder):
assert res.status_code == 200
assert len(res.json) == 2

body = json.dumps({'limit': 1}).encode("utf-8")
res = client.simulate_post(f"/identifiers/test/credentials/query", body=body)
assert res.status_code == 200
assert len(res.json) == 1

body = json.dumps({'limit': 2}).encode("utf-8")
res = client.simulate_post(f"/identifiers/test/credentials/query", body=body)
assert res.status_code == 200
assert len(res.json) == 2

body = json.dumps({'limit': 4, 'skip':0}).encode("utf-8")
res = client.simulate_post(f"/identifiers/test/credentials/query", body=body)
assert res.status_code == 200
assert len(res.json) == 4

body = json.dumps({'limit': 4, 'skip':4}).encode("utf-8")
res = client.simulate_post(f"/identifiers/test/credentials/query", body=body)
assert res.status_code == 200
assert len(res.json) == 1

res = client.simulate_get(f"/identifiers/test/credentials/{saids[0]}")
assert res.status_code == 200
assert res.headers['content-type'] == "application/json"
Expand Down

0 comments on commit 9423f53

Please sign in to comment.