aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_fastapi.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-07 13:52:20 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-07 13:52:20 +0530
commit359813517e3382c527125fe673fa89f0fd0742c0 (patch)
tree5010e2427cf0d19e7365e44fac40612375c135c9 /app/tests/test_fastapi.py
parentb752efffe410c9cc9cd53f8c50a5fb9f75069e93 (diff)
added docstrings
Diffstat (limited to 'app/tests/test_fastapi.py')
-rw-r--r--app/tests/test_fastapi.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/tests/test_fastapi.py b/app/tests/test_fastapi.py
index f8c304e..2b26754 100644
--- a/app/tests/test_fastapi.py
+++ b/app/tests/test_fastapi.py
@@ -1,3 +1,7 @@
+# -*- coding: utf-8 -*-
+"""
+Test(s) for FastAPI Inegration
+"""
from starlette.testclient import TestClient
from api import app as fastapi_app
@@ -6,12 +10,22 @@ fastapi_client = TestClient(fastapi_app)
def test_fastapi(app, client):
+ """
+ Basic Version Test
+
+ Check if endpoint is accessible
+ """
res = fastapi_client.get("/version")
assert res.status_code == 200
assert res.json() == {"message": fastapi_app.version}
def test_fastapi_user_details(app, client):
+ """
+ Basic User Test
+
+ Check if DB is accessible to the FastAPI App
+ """
# TODO Investigate why this is failing
# res = fastapi_client.get("/v1/user-details?email={}".format("admin@example.com"))
# assert res.status_code == 200