diff options
Diffstat (limited to 'djangorestframework/tests')
| -rw-r--r-- | djangorestframework/tests/authentication.py | 10 | ||||
| -rw-r--r-- | djangorestframework/tests/reverse.py | 6 |
2 files changed, 5 insertions, 11 deletions
diff --git a/djangorestframework/tests/authentication.py b/djangorestframework/tests/authentication.py index af9c34ca..246ad4a0 100644 --- a/djangorestframework/tests/authentication.py +++ b/djangorestframework/tests/authentication.py @@ -1,16 +1,14 @@ from django.conf.urls.defaults import patterns -from django.test import TestCase -from django.test import Client +from django.test import Client, TestCase +from django.utils import simplejson as json + from djangorestframework.compat import RequestFactory from djangorestframework.resource import Resource from django.contrib.auth.models import User from django.contrib.auth import login import base64 -try: - import json -except ImportError: - import simplejson as json + class MockResource(Resource): allowed_methods = ('POST',) 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""" |
