mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
also update test with response code 401
This commit is contained in:
parent
050e228edc
commit
19f67bd578
|
@ -167,7 +167,7 @@ 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."""
|
||||
|
|
Loading…
Reference in New Issue
Block a user