Unverified Commit 0b6d0e26 authored by Johannes Tomren Røsvik's avatar Johannes Tomren Røsvik
Browse files

Add test_empty

parent aebe969f
......@@ -36,6 +36,43 @@ class AgreelanceSignUp(unittest.TestCase):
self.assertTrue(formstate)
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",
]
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:
values = self.getNominalValues()
values[field] = ""
print(values)
formstate = self.fill_form(values)
self.assertTrue(formstate)
def fill_form(self, values):
driver = self.driver
driver.get(url)
......
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