Commit 13519a31 authored by Håkon Johansen Finstad's avatar Håkon Johansen Finstad
Browse files


parent 9ba1bece
Pipeline #162314 passed with stages
in 2 minutes and 59 seconds
......@@ -34,18 +34,6 @@ class UserSerializerTest(TestCase):
self.serializer = UserSerializer(data=self.user_attributes, instance=self.user, context=serializer_context)
def test_validate_password(self):
user_serializer = self.serializer
password = user_serializer.get_initial().get("password")
password1 = user_serializer.get_initial().get("password1") # password =/= password1
# The validate_password class validates the first password field against itself, meaning it does not valid
# the 2 inputs making it "impossible" to test
self.assertEqual(UserSerializer.validate_password(self.serializer, password), password)
self.assertEqual(UserSerializer.validate_password(self.serializer, password1), password1)
self.assertNotEqual(UserSerializer.validate_password(self.serializer, password), password1)
def test_create_user(self):
user_serializer = UserSerializer()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment