aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_fastapi.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:49:56 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:49:56 +0530
commit812220acbfd41aea0382fcd9a37a989a4b091d66 (patch)
tree0f4277216efe81e6b8d21d9dfc39a3d343fac48e /app/tests/test_fastapi.py
parentad92a42e8439337cfde346fa84e75a5f91164eac (diff)
parent62a5ca363415b0f6f98785b6c3522a71fc895a72 (diff)
fixing pull
Diffstat (limited to 'app/tests/test_fastapi.py')
-rw-r--r--app/tests/test_fastapi.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/app/tests/test_fastapi.py b/app/tests/test_fastapi.py
index 89ae368..f8c304e 100644
--- a/app/tests/test_fastapi.py
+++ b/app/tests/test_fastapi.py
@@ -4,17 +4,19 @@ from api import app as fastapi_app
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}
+ res = fastapi_client.get("/version")
+ 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"
+ # 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"))
- assert res.status_code == 404
- assert res.json()["detail"] == "User Not Found"
+ res = fastapi_client.get("/v1/user-details?email={}".format("notadmin@example.com"))
+ assert res.status_code == 404
+ assert res.json()["detail"] == "User Not Found"