Skip to content
Snippets Groups Projects
Commit 1cfd8b42 authored by Håvard Farestveit's avatar Håvard Farestveit
Browse files

#36 Added docstring to 2-way domain test

parent 03e2456c
No related branches found
No related tags found
No related merge requests found
Pipeline #126658 passed
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment