Commit 1cfd8b42 authored by Håvard Farestveit's avatar Håvard Farestveit
Browse files

#36 Added docstring to 2-way domain test

parent 03e2456c
Pipeline #126658 passed with stage
in 39 seconds
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment