From 762a52edde09297e87c640797219c9bb8255d50a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 25 Apr 2011 04:50:28 +0100 Subject: Fix some compat issues with json/simplejson --- examples/blogpost/tests.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'examples/blogpost/tests.py') diff --git a/examples/blogpost/tests.py b/examples/blogpost/tests.py index dfb4d5f5..14b0914d 100644 --- a/examples/blogpost/tests.py +++ b/examples/blogpost/tests.py @@ -1,13 +1,15 @@ """Test a range of REST API usage of the example application. """ -from django.test import TestCase from django.core.urlresolvers import reverse +from django.test import TestCase +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,6 @@ 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. -- cgit v1.2.3 From 5a59f339c1757767b136de33faa5b67a972141a1 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 27 Apr 2011 18:44:21 +0100 Subject: Urg. Fixing broken merge --- examples/blogpost/tests.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'examples/blogpost/tests.py') diff --git a/examples/blogpost/tests.py b/examples/blogpost/tests.py index 494478d8..9b9a682f 100644 --- a/examples/blogpost/tests.py +++ b/examples/blogpost/tests.py @@ -3,10 +3,7 @@ from django.core.urlresolvers import reverse from django.test import TestCase -<<<<<<< local -======= from django.core.urlresolvers import reverse ->>>>>>> other from django.utils import simplejson as json from djangorestframework.compat import RequestFactory @@ -170,10 +167,7 @@ class AllowedMethodsTests(TestCase): #above testcases need to probably moved to the core -<<<<<<< local -======= ->>>>>>> other class TestRotation(TestCase): """For the example the maximum amount of Blogposts is capped off at views.MAX_POSTS. -- cgit v1.2.3