From 6595d53212eaa4b9319da7196f5e2286d30eb462 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 6 Jun 2021 10:11:00 +0000 Subject: Format code with black This commit fixes the style issues introduced in 57207ef according to the output from black. Details: https://deepsource.io/gh/navanchauhan/SaaS-in-a-Flask/transform/fb582430-1f1f-45bb-8c05-5f5bec16f981/ --- app/tests/test_fastapi.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'app/tests/test_fastapi.py') 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" -- cgit v1.2.3