def test_login_wrong_password(self, auth_service): auth_service.register_user("test@example.com", "ValidPass123!") with pytest.raises(InvalidPasswordError): auth_service.login("test@example.com", "WrongPass456!", "192.168.1.1")
test_auth.py content: """
def test_login_success(self, auth_service): auth_service.register_user("test@example.com", "ValidPass123!") token, user = auth_service.login("test@example.com", "ValidPass123!", "192.168.1.1") assert token is not None assert user.email == "test@example.com" andrei neagoie python