def test_custom_user_valid(self): User = get_user_model() u = User(identifier="customuser") u.save() validate_user("customuser")
def test_custom_user_invalid(self): with self.assertRaises(ValidationError): validate_user("nottestuser")
def test_valid_user(self): User = get_user_model() User.objects.create_user(username="******", email="test@user") validate_user("testuser")