aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/authentication.py
diff options
context:
space:
mode:
authorXavier Ordoquy2012-12-02 12:43:32 +0100
committerXavier Ordoquy2012-12-02 12:43:32 +0100
commit5fad46d7e213afed503b1533515cab96875a5936 (patch)
tree72ab362e86a83ba53361613dbb1e7863889ea749 /rest_framework/tests/authentication.py
parentfa53dde576c8733292eacf27c80cf7a0ad222c3b (diff)
parent3114b4fa50e7aee296a0de17e7bcdc0753700ec3 (diff)
downloaddjango-rest-framework-5fad46d7e213afed503b1533515cab96875a5936.tar.bz2
Merge remote-tracking branch 'reference/master' into p3k
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 33ef0312..b1da5b6f 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."""