Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Johannes Tomren Røsvik
Agreelance
Commits
0b6d0e26
Unverified
Commit
0b6d0e26
authored
Mar 24, 2020
by
Johannes Tomren Røsvik
Browse files
Add test_empty
parent
aebe969f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_signup.py
View file @
0b6d0e26
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment