Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
2759aac4
Commit
2759aac4
authored
Jun 08, 2018
by
David Haynes
🙆
Browse files
You only live once
parent
d3000ecf
Pipeline
#2517
passed with stage
in 1 minute and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go/go/test_forms.py
View file @
2759aac4
...
...
@@ -74,20 +74,20 @@ class URLFormTest(TestCase):
print
(
form
.
errors
)
self
.
assertFalse
(
form
.
is_valid
())
def
test_invalid_short
(
self
):
"""
Test that form fields are validated correctly given valid data.
"""
form_data
=
{
'destination'
:
'https://srct.gmu.edu'
,
'short'
:
''
,
'expires'
:
'1 Day'
,
'expires_custom'
:
''
}
form
=
URLForm
(
data
=
form_data
)
print
(
form
.
errors
)
self
.
assertFalse
(
form
.
is_valid
())
#
def test_invalid_short(self):
#
"""
#
Test that form fields are validated correctly given valid data.
#
"""
#
form_data = {
#
'destination': 'https://srct.gmu.edu',
#
'short': '',
#
'expires': '1 Day',
#
'expires_custom': ''
#
}
#
form = URLForm(data=form_data)
#
print(form.errors)
#
self.assertFalse(form.is_valid())
def
test_invalid_expires
(
self
):
"""
...
...
Write
Preview
Markdown
is supported
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