aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/authentication.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/authentication.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/authentication.py')
-rw-r--r--djangorestframework/tests/authentication.py10
1 files changed, 4 insertions, 6 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',)