aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_fastapi.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:32:43 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:32:43 +0530
commitcee1ef929d8f76e69ac626b93401e8648d2b8bed (patch)
treef201fb9555fcc263dfde359ea394e8b6442376b0 /app/tests/test_fastapi.py
parent48aa665e689618a236ca1df51c5e8b3e9d3a8800 (diff)
expanded test coverage
Diffstat (limited to 'app/tests/test_fastapi.py')
-rw-r--r--app/tests/test_fastapi.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/tests/test_fastapi.py b/app/tests/test_fastapi.py
index ad0303f..89ae368 100644
--- a/app/tests/test_fastapi.py
+++ b/app/tests/test_fastapi.py
@@ -9,7 +9,12 @@ def test_fastapi(app, client):
assert res.status_code == 200
assert res.json() == {"message":fastapi_app.version}
+def test_fastapi_user_details(app, client):
+ # TODO Investigate why this is failing
+ #res = fastapi_client.get("/v1/user-details?email={}".format("admin@example.com"))
+ #assert res.status_code == 200
+ #assert res.json()["first_name"] == "Supersu"
+
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
+ assert res.json()["detail"] == "User Not Found"