aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blogpost
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-04-26 20:20:31 +0100
committertom christie tom@tomchristie.com2011-04-26 20:20:31 +0100
commit3d15adaeb11a2f2f2961280026232743afc61398 (patch)
treeb37c359805420721c52f5637edf191508c663288 /examples/blogpost
parentd0fe36aaa48348874d87202442ea8351b63b0e81 (diff)
downloaddjango-rest-framework-3d15adaeb11a2f2f2961280026232743afc61398.tar.bz2
Fixes #35 - Import json from django's built-in package (Does cleverness in determing best lib to use)
Diffstat (limited to 'examples/blogpost')
-rw-r--r--examples/blogpost/tests.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/blogpost/tests.py b/examples/blogpost/tests.py
index dfb4d5f5..d4084e72 100644
--- a/examples/blogpost/tests.py
+++ b/examples/blogpost/tests.py
@@ -3,11 +3,13 @@
from django.test import TestCase
from django.core.urlresolvers import reverse
+from django.utils import simplejson as json
+
+from djangorestframework.compat import RequestFactory
+
from blogpost import views, models
import blogpost
-#import json
-#from rest.utils import xml2dict, dict2xml
class AcceptHeaderTests(TestCase):
"""Test correct behaviour of the Accept header as specified by RFC 2616:
@@ -164,11 +166,7 @@ class AllowedMethodsTests(TestCase):
#above testcases need to probably moved to the core
-from djangorestframework.compat import RequestFactory
-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.