aboutsummaryrefslogtreecommitdiff
path: root/app/tests
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:22:02 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:22:02 +0530
commitff23de920e1c0837bbc1a82799feeaef9c83a723 (patch)
treebac6f5b94212715591d4b177a85df7a2ce33ecc4 /app/tests
parentade68ff6bf30d1462ea107d44b33377cef77ec33 (diff)
testing if user does not exist
Diffstat (limited to 'app/tests')
-rw-r--r--app/tests/test_fastapi.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/tests/test_fastapi.py b/app/tests/test_fastapi.py
index c6b40cc..ad0303f 100644
--- a/app/tests/test_fastapi.py
+++ b/app/tests/test_fastapi.py
@@ -7,4 +7,9 @@ fastapi_client = TestClient(fastapi_app)
def test_fastapi(app, client):
res = fastapi_client.get("/version")
assert res.status_code == 200
- assert res.json() == {"message":fastapi_app.version} \ No newline at end of file
+ assert res.json() == {"message":fastapi_app.version}
+
+ res = fastapi_client.get("/v1/user-details?email={}".format("notadmin@example.com"))
+ print(res.json())
+ assert res.status_code == 404
+ assert res.json()["detail"] == "User Not Found" \ No newline at end of file