aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/reverse.py
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 /djangorestframework/tests/reverse.py
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 'djangorestframework/tests/reverse.py')
-rw-r--r--djangorestframework/tests/reverse.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/djangorestframework/tests/reverse.py b/djangorestframework/tests/reverse.py
index a862e39a..2718ebca 100644
--- a/djangorestframework/tests/reverse.py
+++ b/djangorestframework/tests/reverse.py
@@ -1,14 +1,10 @@
from django.conf.urls.defaults import patterns, url
from django.core.urlresolvers import reverse
from django.test import TestCase
+from django.utils import simplejson as json
from djangorestframework.resource import Resource
-try:
- import json
-except ImportError:
- import simplejson as json
-
class MockResource(Resource):
"""Mock resource which simply returns a URL, so that we can ensure that reversed URLs are fully qualified"""