From 2412df4960efdaf716556cad8b59030d033a19a8 Mon Sep 17 00:00:00 2001 From: Brain Date: Wed, 28 Aug 2024 13:43:33 +0200 Subject: [PATCH] Apply yapf and add ignorefile --- .yapfignore | 5 +++++ ki/routes.py | 1 + ki/test/test_contacttypes_endpoint.py | 1 + ki/test/test_find_profiles_endpoint.py | 1 + ki/test/test_languages_endpoint.py | 1 + ki/test/test_login_endpoint.py | 1 + ki/test/test_skills_endpoint.py | 1 + 7 files changed, 11 insertions(+) create mode 100644 .yapfignore diff --git a/.yapfignore b/.yapfignore new file mode 100644 index 0000000..7328448 --- /dev/null +++ b/.yapfignore @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: WTF Kooperative eG +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +migrations/*.py diff --git a/ki/routes.py b/ki/routes.py index e8ad4a3..946e624 100644 --- a/ki/routes.py +++ b/ki/routes.py @@ -17,6 +17,7 @@ content_type_png = "image/png" def token_auth(func): + @wraps(func) def _token_auth(*args, **kwargs): auth_header = request.headers.get("Authorization") diff --git a/ki/test/test_contacttypes_endpoint.py b/ki/test/test_contacttypes_endpoint.py index 9705630..5cd37fb 100644 --- a/ki/test/test_contacttypes_endpoint.py +++ b/ki/test/test_contacttypes_endpoint.py @@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest class TestContactTypesEndpoint(ApiTest): + def test_skills_options(self): response = self.client.options("/contacttypes") self.assertEqual(response.status_code, 200) diff --git a/ki/test/test_find_profiles_endpoint.py b/ki/test/test_find_profiles_endpoint.py index 74eeae3..ef8b2b1 100644 --- a/ki/test/test_find_profiles_endpoint.py +++ b/ki/test/test_find_profiles_endpoint.py @@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest class TestFindProfilesEndpoint(ApiTest): + def test_find_profiles_options(self): response = self.client.options("/users/profiles") self.assertEqual(response.status_code, 200) diff --git a/ki/test/test_languages_endpoint.py b/ki/test/test_languages_endpoint.py index dcf1199..c872ba8 100644 --- a/ki/test/test_languages_endpoint.py +++ b/ki/test/test_languages_endpoint.py @@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest class TestLanguagesEndpoint(ApiTest): + def test_skills_options(self): response = self.client.options("/languages") self.assertEqual(response.status_code, 200) diff --git a/ki/test/test_login_endpoint.py b/ki/test/test_login_endpoint.py index e431cb7..c9a1341 100644 --- a/ki/test/test_login_endpoint.py +++ b/ki/test/test_login_endpoint.py @@ -10,6 +10,7 @@ from ki.test.ApiTest import ApiTest class TestLoginEndpoint(ApiTest): + def test_login(self): response1_data = self.login("peter", "geheim") response2_data = self.login("peter", "geheim") diff --git a/ki/test/test_skills_endpoint.py b/ki/test/test_skills_endpoint.py index 1e40ae6..60acf21 100644 --- a/ki/test/test_skills_endpoint.py +++ b/ki/test/test_skills_endpoint.py @@ -8,6 +8,7 @@ from ki.test.ApiTest import ApiTest class TestSkillsEndpoint(ApiTest): + def test_skills_options(self): response = self.client.options("/skills") self.assertEqual(response.status_code, 200)