From 5f35adeec71ce0487334d1cade5bd5e0135c9728 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Sat, 17 Jun 2023 23:49:12 +0200 Subject: [PATCH] :rotating_light: Fixed deepsource issues --- classquiz/tests/test_server.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/classquiz/tests/test_server.py b/classquiz/tests/test_server.py index 4cbae8c..5b4a4ca 100644 --- a/classquiz/tests/test_server.py +++ b/classquiz/tests/test_server.py @@ -24,7 +24,8 @@ from fastapi.testclient import TestClient class TestUsers: - def log_in(self, tc: TestClient, email=test_user_email, password=test_user_password) -> int: + @staticmethod + def log_in(tc: TestClient, email=test_user_email, password=test_user_password) -> int: resp = tc.post("/api/v1/login/start", json={"email": email}) session_id = resp.json()["session_id"] resp = tc.post( @@ -409,7 +410,7 @@ class TestCommunity: user_id = user.json()["id"] resp = test_client.get(f"/api/v1/community/quizzes/{user_id}") data = resp.json() - assert type(data) == list + assert type(data) is list class TestSitemap: @@ -482,7 +483,7 @@ class TestStorage: resp = test_client.get("/api/v1/storage/list", cookies=ValueStorage.cookies) assert resp.status_code == 200 data = resp.json() - assert type(data) == list + assert type(data) is list assert len(data) >= 2 @pytest.mark.asyncio @@ -490,7 +491,7 @@ class TestStorage: resp = test_client.get("/api/v1/storage/list/last", cookies=ValueStorage.cookies) assert resp.status_code == 200 data = resp.json() - assert type(data) == list + assert type(data) is list assert len(data) >= 2 resp = test_client.get("/api/v1/storage/list/last?count=1", cookies=ValueStorage.cookies) assert resp.status_code == 200 @@ -502,7 +503,7 @@ class TestStorage: assert resp.status_code == 200 data = resp.json() assert data["limit_reached"] is False - assert type(data["limit"]) == int + assert type(data["limit"]) is int assert data["used"] == 0