From aecad9f68ad853fadb95364e076fc3c135619bcf Mon Sep 17 00:00:00 2001 From: superolegatron Date: Fri, 13 Sep 2024 19:28:31 +0300 Subject: [PATCH] minor fixes --- BackEnd/authentication/serializers.py | 3 +-- BackEnd/authentication/tests/test_user_autologout.py | 4 +++- BackEnd/authentication/tests/test_user_login.py | 4 +++- BackEnd/authentication/tests/test_user_logout.py | 4 +++- BackEnd/authentication/tests/test_user_registration.py | 4 +++- .../{utils/recaptcha.py => validation/validate_recaptcha.py} | 0 6 files changed, 13 insertions(+), 6 deletions(-) rename BackEnd/{utils/recaptcha.py => validation/validate_recaptcha.py} (100%) diff --git a/BackEnd/authentication/serializers.py b/BackEnd/authentication/serializers.py index 60223dbb4..37508858a 100644 --- a/BackEnd/authentication/serializers.py +++ b/BackEnd/authentication/serializers.py @@ -20,8 +20,7 @@ validate_password_include_symbols, ) from validation.validate_profile import validate_profile - -from utils.recaptcha import verify_recaptcha +from validation.validate_recaptcha import verify_recaptcha User = get_user_model() diff --git a/BackEnd/authentication/tests/test_user_autologout.py b/BackEnd/authentication/tests/test_user_autologout.py index 1a54b3c2a..fe2b75c28 100644 --- a/BackEnd/authentication/tests/test_user_autologout.py +++ b/BackEnd/authentication/tests/test_user_autologout.py @@ -13,7 +13,9 @@ class UserLogoutAPITests(APITestCase): def setUp(self): - patcher = patch("authentication.serializers.verify_recaptcha", return_value=True) + patcher = patch( + "authentication.serializers.verify_recaptcha", return_value=True + ) self.mock_verify_recaptcha = patcher.start() self.addCleanup(patcher.stop) diff --git a/BackEnd/authentication/tests/test_user_login.py b/BackEnd/authentication/tests/test_user_login.py index b30a1da90..8e7c9b0db 100644 --- a/BackEnd/authentication/tests/test_user_login.py +++ b/BackEnd/authentication/tests/test_user_login.py @@ -11,7 +11,9 @@ class UserLoginAPITests(APITestCase): def setUp(self): - patcher = patch("authentication.serializers.verify_recaptcha", return_value=True) + patcher = patch( + "authentication.serializers.verify_recaptcha", return_value=True + ) self.mock_verify_recaptcha = patcher.start() self.addCleanup(patcher.stop) diff --git a/BackEnd/authentication/tests/test_user_logout.py b/BackEnd/authentication/tests/test_user_logout.py index d9493789d..29c7f279c 100644 --- a/BackEnd/authentication/tests/test_user_logout.py +++ b/BackEnd/authentication/tests/test_user_logout.py @@ -10,7 +10,9 @@ class UserLogoutAPITests(APITestCase): def setUp(self): - patcher = patch("authentication.serializers.verify_recaptcha", return_value=True) + patcher = patch( + "authentication.serializers.verify_recaptcha", return_value=True + ) self.mock_verify_recaptcha = patcher.start() self.addCleanup(patcher.stop) diff --git a/BackEnd/authentication/tests/test_user_registration.py b/BackEnd/authentication/tests/test_user_registration.py index eaf713a66..f9ec1e4e6 100644 --- a/BackEnd/authentication/tests/test_user_registration.py +++ b/BackEnd/authentication/tests/test_user_registration.py @@ -10,7 +10,9 @@ class UserRegistrationAPITests(APITestCase): def setUp(self): - patcher = patch("authentication.serializers.verify_recaptcha", return_value=True) + patcher = patch( + "authentication.serializers.verify_recaptcha", return_value=True + ) self.mock_verify_recaptcha = patcher.start() self.addCleanup(patcher.stop) diff --git a/BackEnd/utils/recaptcha.py b/BackEnd/validation/validate_recaptcha.py similarity index 100% rename from BackEnd/utils/recaptcha.py rename to BackEnd/validation/validate_recaptcha.py