aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blogpost/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/blogpost/tests.py')
-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.