From d3ec860dd1fedf27042b3d08bf6c7e4f4adbddc9 Mon Sep 17 00:00:00 2001 From: Ben Timby Date: Tue, 24 Jan 2012 14:36:34 -0500 Subject: [PATCH] Modified test case to pass regardless of JSON library --- djangorestframework/tests/renderers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/djangorestframework/tests/renderers.py b/djangorestframework/tests/renderers.py index adb46f7fa..77b5430fa 100644 --- a/djangorestframework/tests/renderers.py +++ b/djangorestframework/tests/renderers.py @@ -1,3 +1,5 @@ +import re + from django.conf.urls.defaults import patterns, url from django.test import TestCase @@ -187,6 +189,8 @@ class JSONRendererTests(TestCase): obj = {'foo': ['bar', 'baz']} renderer = JSONRenderer(None) 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) def test_with_content_type_args(self):