aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/authentication.py
diff options
context:
space:
mode:
authorMjumbe Wawatu Poe2012-09-07 14:23:53 -0400
committerMjumbe Wawatu Poe2012-09-07 14:23:53 -0400
commit3b1404bd7d37d8c60cf45071852f86eea8d4c68f (patch)
treec7e12174dab6415cd0ce21d578d553d7cf627f5e /djangorestframework/tests/authentication.py
parent36cd91bbbe6bc0aeef9b1eb711415988f5c4e501 (diff)
downloaddjango-rest-framework-3b1404bd7d37d8c60cf45071852f86eea8d4c68f.tar.bz2
Rename the default token class to "BasicToken"
Diffstat (limited to 'djangorestframework/tests/authentication.py')
-rw-r--r--djangorestframework/tests/authentication.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/djangorestframework/tests/authentication.py b/djangorestframework/tests/authentication.py
index da003a05..dfed2fcc 100644
--- a/djangorestframework/tests/authentication.py
+++ b/djangorestframework/tests/authentication.py
@@ -8,7 +8,7 @@ from django.http import HttpResponse
from djangorestframework.views import APIView
from djangorestframework import permissions
-from djangorestframework.tokenauth.models import Token
+from djangorestframework.tokenauth.models import BasicToken
from djangorestframework.tokenauth.authentication import TokenAuthentication
import base64
@@ -123,7 +123,7 @@ class TokenAuthTests(TestCase):
self.user = User.objects.create_user(self.username, self.email, self.password)
self.key = 'abcd1234'
- self.token = Token.objects.create(key=self.key, user=self.user)
+ self.token = BasicToken.objects.create(key=self.key, user=self.user)
def test_post_form_passing_token_auth(self):
"""Ensure POSTing json over token auth with correct credentials passes and does not require CSRF"""
@@ -149,5 +149,5 @@ class TokenAuthTests(TestCase):
def test_token_has_auto_assigned_key_if_none_provided(self):
"""Ensure creating a token with no key will auto-assign a key"""
- token = Token.objects.create(user=self.user)
+ token = BasicToken.objects.create(user=self.user)
self.assertEqual(len(token.key), 32)