Skip to content

Commit

Permalink
tests: Add latest tests
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed May 4, 2021
1 parent b3d4905 commit 13f7bc7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_annotation_app() -> None:
assert test_client.get("/v1_1/docs").status_code == 200
assert test_client.get("/v1_2/docs").status_code == 200
assert test_client.get("/v1_3/docs").status_code == 200
assert test_client.get("/latest/docs").status_code == 200
assert test_client.get("/v1_4/docs").status_code == 404

assert test_client.get("/v1_0/item/1").status_code == 404
Expand All @@ -24,6 +25,10 @@ def test_annotation_app() -> None:
assert (
test_client.get("/v1_3/item/1").json()["quantity"] == complex_quantity
)
assert (
test_client.get("/latest/item/1").json()["quantity"]
== complex_quantity
)

assert test_client.delete("/v1_1/item/1").status_code == 405
assert test_client.delete("/v1_2/item/1").status_code == 200
Expand Down

0 comments on commit 13f7bc7

Please sign in to comment.