Unverified Commit 241c3f8b authored by Johannes Tomren Røsvik's avatar Johannes Tomren Røsvik
Browse files

Update test_signup

parent 0b6d0e26
Pipeline #76988 passed with stage
in 1 minute and 9 seconds
......@@ -39,39 +39,29 @@ class AgreelanceSignUp(unittest.TestCase):
def test_empty(self):
driver = self.driver
required = [
"username",
"firstname",
"lastname",
"email",
"email_confirmation",
"password",
"password_confirmation",
"phone_number",
"country",
"state",
"city",
"postal_code",
"street_address",
testcases = [
["username", "", False],
["firstname", "", False],
["lastname", "", False],
["company", "", True],
["email", "", False],
["email_confirmation", "", False],
["password", "", False],
["password_confirmation", "", False],
["phone_number", "", False],
["country", "", False],
["state", "", False],
["city", "", False],
["postal_code", "", False],
["street_address", "", False],
]
optional = [
"company"
]
for field in required:
values = self.getNominalValues()
values[field] = ""
print(values)
formstate = self.fill_form(values)
self.assertFalse(formstate)
for field in optional:
for case in testcases:
values = self.getNominalValues()
values[field] = ""
print(values)
values[case[0]] = case[1]
# print(values)
formstate = self.fill_form(values)
self.assertTrue(formstate)
self.assertTrue(formstate == case[2])
def fill_form(self, values):
driver = self.driver
......
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