Adjust test to pass on Django 1.8

This commit is contained in:
Artem Muterko 2017-01-23 15:56:50 +02:00
parent 938c036b8e
commit 1b30922e74

View File

@ -263,7 +263,9 @@ class BaseTokenAuthTests(object):
assert response.status_code == status.HTTP_200_OK assert response.status_code == status.HTTP_200_OK
def test_fail_authentication_if_user_is_not_active(self): def test_fail_authentication_if_user_is_not_active(self):
user = User.objects.create_user('foo', 'bar', 'baz', is_active=False) user = User.objects.create_user('foo', 'bar', 'baz')
user.is_active = False
user.save()
self.model.objects.create(key='foobar_token', user=user) self.model.objects.create(key='foobar_token', user=user)
response = self.csrf_client.post( response = self.csrf_client.post(
self.path, {'example': 'example'}, self.path, {'example': 'example'},