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
a2732b1d
Unverified
Commit
a2732b1d
authored
Feb 07, 2017
by
David Haynes
Browse files
Test the about URL
- also fix some coments
parent
bc2cc919
Pipeline
#855
passed with stage
in 1 minute and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go/settings/test_urls.py
View file @
a2732b1d
...
...
@@ -23,33 +23,36 @@ class UrlsTest(TestCase):
self
.
assertEqual
(
url
,
'/'
)
"""
# /view/<short> - View URL data.
url(r'^view/(?P<short>[-\w]+)$', go.views.view, name='view'),
/view/<short> - View URL data.
"""
def
test_view_chars
(
self
):
url
=
reverse
(
'view'
,
args
=
[
'dhaynes'
])
self
.
assertEqual
(
url
,
'/view/dhaynes'
)
"""
# /view/<short> - View URL data.
url(r'^view/(?P<short>[-\w]+)$', go.views.view, name='view'),
/view/<short> - View URL data.
"""
def
test_view_ints
(
self
):
url
=
reverse
(
'view'
,
args
=
[
'123456789'
])
self
.
assertEqual
(
url
,
'/view/123456789'
)
"""
# /view/<short> - View URL data.
url(r'^view/(?P<short>[-\w]+)$', go.views.view, name='view'),
/view/<short> - View URL data.
"""
def
test_view_chars_ints
(
self
):
url
=
reverse
(
'view'
,
args
=
[
'dhaynes123'
])
self
.
assertEqual
(
url
,
'/view/dhaynes123'
)
"""
# /view/<short> - View URL data.
url(r'^view/(?P<short>[-\w]+)$', go.views.view, name='view'),
/view/<short> - View URL data.
"""
def
test_view_full_slug
(
self
):
url
=
reverse
(
'view'
,
args
=
[
'dhaynes123_-'
])
self
.
assertEqual
(
url
,
'/view/dhaynes123_-'
)
"""
/about - About page.
"""
def
test_view_full_slug
(
self
):
url
=
reverse
(
'about'
)
self
.
assertEqual
(
url
,
'/about'
)
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