diff --git a/backend/secfit/users/tests/user_registration.py b/backend/secfit/users/tests/user_registration.py index 2ee9fcaa13b66fed6ce17d1f3b0a8a4ede0617ee..cf11651a669b377002e0fe53891888c4e9394e98 100644 --- a/backend/secfit/users/tests/user_registration.py +++ b/backend/secfit/users/tests/user_registration.py @@ -10,6 +10,9 @@ class UserRegistration2WayTestCase(TestCase): self.client = Client() def test_two_way(self): + """ + Performing 2-way domain test + """ for testcase in test_cases: request = {} invalid_request = False @@ -24,6 +27,7 @@ class UserRegistration2WayTestCase(TestCase): elif key == ('username' or 'password' or 'password1') and value == 'blank': invalid_request = True + # Checking if the repsonse should return status code 400 or 201 response_code = 400 if invalid_request else 201 response = self.client.post('/api/users/', request) self.assertEqual(response.status_code, response_code)