aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkotibold2011-03-20 11:56:43 +0100
committermarkotibold2011-03-20 11:56:43 +0100
commitb4a076c8226223bb650605f4d04609f1f59b5913 (patch)
treecc29250830890e01ecb506c6406c579066a172be
parentd866f2177e92f10a554a7dfd7eee9d93d67927be (diff)
downloaddjango-rest-framework-b4a076c8226223bb650605f4d04609f1f59b5913.tar.bz2
fixing compat with py25
-rw-r--r--examples/blogpost/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/blogpost/tests.py b/examples/blogpost/tests.py
index 3cc1aed0..dfb4d5f5 100644
--- a/examples/blogpost/tests.py
+++ b/examples/blogpost/tests.py
@@ -165,7 +165,10 @@ class AllowedMethodsTests(TestCase):
#above testcases need to probably moved to the core
from djangorestframework.compat import RequestFactory
-import json
+try:
+ import json
+except ImportError:
+ import simplejson as json
class TestRotation(TestCase):
"""For the example the maximum amount of Blogposts is capped off at views.MAX_POSTS.