Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
8043ff3f
Commit
8043ff3f
authored
Jan 20, 2017
by
Artem Muterko
Committed by
Tom Christie
Jan 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for urlquote_wrapper (#4832)
parent
e21afbe7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
tests/test_templatetags.py
+10
-0
No files found.
tests/test_templatetags.py
View file @
8043ff3f
...
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
...
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
from
django.test
import
TestCase
from
django.test
import
TestCase
from
rest_framework.relations
import
Hyperlink
from
rest_framework.relations
import
Hyperlink
from
rest_framework.templatetags
import
rest_framework
from
rest_framework.templatetags.rest_framework
import
(
from
rest_framework.templatetags.rest_framework
import
(
add_nested_class
,
add_query_param
,
as_string
,
break_long_headers
,
add_nested_class
,
add_query_param
,
as_string
,
break_long_headers
,
format_value
,
get_pagination_html
,
urlize_quoted_links
format_value
,
get_pagination_html
,
urlize_quoted_links
...
@@ -268,6 +269,15 @@ class Issue1386Tests(TestCase):
...
@@ -268,6 +269,15 @@ class Issue1386Tests(TestCase):
# example from issue #1386, this shouldn't raise an exception
# example from issue #1386, this shouldn't raise an exception
urlize_quoted_links
(
"asdf:[/p]zxcv.com"
)
urlize_quoted_links
(
"asdf:[/p]zxcv.com"
)
def
test_smart_urlquote_wrapper_handles_value_error
(
self
):
def
mock_smart_urlquote
(
url
):
raise
ValueError
old
=
rest_framework
.
smart_urlquote
rest_framework
.
smart_urlquote
=
mock_smart_urlquote
assert
rest_framework
.
smart_urlquote_wrapper
(
'test'
)
is
None
rest_framework
.
smart_urlquote
=
old
class
URLizerTests
(
TestCase
):
class
URLizerTests
(
TestCase
):
"""
"""
...
...
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