Commit 54caf6d7 by Ben Timby

Modified test case to pass regardless of JSON library

parent 2d873911
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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment