Removed test for ObtainAuthToken serializer raising ValidationError because ValidationError will be raised.

This commit is contained in:
Mark Winterbottom 2018-10-19 07:26:27 +01:00
parent 4440803620
commit 8adb05418d
No known key found for this signature in database
GPG Key ID: 766B4B600637B315

View File

@ -10,7 +10,6 @@ from rest_framework.authtoken.management.commands.drf_create_token import \
Command as AuthTokenCommand
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
from rest_framework.exceptions import ValidationError
class AuthTokenTests(TestCase):
@ -28,10 +27,6 @@ class AuthTokenTests(TestCase):
def test_token_string_representation(self):
assert str(self.token) == 'test token'
def test_validate_raise_error_if_no_credentials_provided(self):
with pytest.raises(ValidationError):
AuthTokenSerializer().validate({})
def test_whitespace_in_password(self):
data = {'username': self.user.username, 'password': 'test pass '}
self.user.set_password(data['password'])