Skip to content

Commit

Permalink
adapt newest test
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Bauer committed Feb 26, 2018
1 parent 3927e3a commit 65ebb2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ def test_invalid_token_length_returns_401_code(self):
self.assertEqual(response.data, {"detail": "Invalid token."})

def test_invalid_odd_length_token_returns_401_code(self):
user = User.objects.create_user('john.doe', '[email protected]', 'test_pwd')
token = AuthToken.objects.create(user)
token = AuthToken.objects.create(self.user)
odd_length_token = token + '1'
url = reverse('api-root')
self.client.credentials(HTTP_AUTHORIZATION=('Token %s' % odd_length_token))
Expand Down

0 comments on commit 65ebb2b

Please sign in to comment.