aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/authentication.py
diff options
context:
space:
mode:
authorMarko Tibold2012-12-06 23:47:47 +0100
committerMarko Tibold2012-12-06 23:47:47 +0100
commitc65f22e0e4e5475aebd848b4db6b282ce524a8f3 (patch)
treebc9a30099abfca3aa11bf4969db64db2affe950c /rest_framework/tests/authentication.py
parent899f96ae9186e68009dba5d54246232d34457354 (diff)
parent6a5f4f2a90ab19a8586a9d762c9b2618e8db5c30 (diff)
downloaddjango-rest-framework-c65f22e0e4e5475aebd848b4db6b282ce524a8f3.tar.bz2
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework into #431
Diffstat (limited to 'rest_framework/tests/authentication.py')
-rw-r--r--rest_framework/tests/authentication.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/tests/authentication.py b/rest_framework/tests/authentication.py
index 96ca9f52..802bc6c1 100644
--- a/rest_framework/tests/authentication.py
+++ b/rest_framework/tests/authentication.py
@@ -167,14 +167,14 @@ class TokenAuthTests(TestCase):
client = Client(enforce_csrf_checks=True)
response = client.post('/auth-token/login/',
json.dumps({'username': self.username, 'password': "badpass"}), 'application/json')
- self.assertEqual(response.status_code, 400)
+ self.assertEqual(response.status_code, 401)
def test_token_login_json_missing_fields(self):
"""Ensure token login view using JSON POST fails if missing fields."""
client = Client(enforce_csrf_checks=True)
response = client.post('/auth-token/login/',
json.dumps({'username': self.username}), 'application/json')
- self.assertEqual(response.status_code, 400)
+ self.assertEqual(response.status_code, 401)
def test_token_login_form(self):
"""Ensure token login view using form POST works."""