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
d3ec860d
Commit
d3ec860d
authored
Jan 24, 2012
by
Ben Timby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified test case to pass regardless of JSON library
parent
049d417e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
djangorestframework/tests/renderers.py
+4
-0
No files found.
djangorestframework/tests/renderers.py
View file @
d3ec860d
import
re
from
django.conf.urls.defaults
import
patterns
,
url
from
django.conf.urls.defaults
import
patterns
,
url
from
django.test
import
TestCase
from
django.test
import
TestCase
...
@@ -187,6 +189,8 @@ class JSONRendererTests(TestCase):
...
@@ -187,6 +189,8 @@ class JSONRendererTests(TestCase):
obj
=
{
'foo'
:
[
'bar'
,
'baz'
]}
obj
=
{
'foo'
:
[
'bar'
,
'baz'
]}
renderer
=
JSONRenderer
(
None
)
renderer
=
JSONRenderer
(
None
)
content
=
renderer
.
render
(
obj
,
'application/json'
)
content
=
renderer
.
render
(
obj
,
'application/json'
)
# Fix failing test case which depends on version of JSON library.
content
=
re
.
sub
(
' +
\n
'
,
'
\n
'
,
content
)
self
.
assertEquals
(
content
,
_flat_repr
)
self
.
assertEquals
(
content
,
_flat_repr
)
def
test_with_content_type_args
(
self
):
def
test_with_content_type_args
(
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