def test_validate_password_with_invalid_details(create_users): # Arrange invalid_password = "******" storage = UserStorageImplementation() # Act with pytest.raises(InvalidPassword): storage.validate_password(password=invalid_password)
def test_validate_password_with_valid_details(create_users): # Arrange password = "******" storage = UserStorageImplementation() # Act storage.validate_password(password=password) # Assert is_valid_password = User.objects.filter(password=password).exists() assert is_valid_password is True