Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
go
Commits
2759aac4
Commit
2759aac4
authored
Jun 08, 2018
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
go/go/test_forms.py
go/go/test_forms.py
+14
-14
No files found.
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