diff --git a/tests/unit/test_auth_register_password_reset.py b/tests/unit/test_auth_register_password_reset.py index f2b03f36a..95dcc2cd9 100755 --- a/tests/unit/test_auth_register_password_reset.py +++ b/tests/unit/test_auth_register_password_reset.py @@ -26,7 +26,6 @@ from packages.application.auth.register_user_use_case import ( VerifyEmailUseCase, ) - # ── Test helpers ───────────────────────────────────────── @@ -86,26 +85,31 @@ class FakeEmailService: self.password_reset_emails = [] def send_verification_email(self, to_email, username, verification_url): - self.verification_emails.append({ - "to": to_email, - "username": username, - "url": verification_url, - }) + self.verification_emails.append( + { + "to": to_email, + "username": username, + "url": verification_url, + } + ) self.sent_emails.append(("verification", to_email)) return self._send_success, self._send_error def send_password_reset_email(self, to_email, username, reset_url): - self.password_reset_emails.append({ - "to": to_email, - "username": username, - "url": reset_url, - }) + self.password_reset_emails.append( + { + "to": to_email, + "username": username, + "url": reset_url, + } + ) self.sent_emails.append(("password_reset", to_email)) return self._send_success, self._send_error class FailingEmailService: """Email service that raises an exception.""" + def send_verification_email(self, **kwargs): raise RuntimeError("SMTP connection failed") @@ -338,9 +342,7 @@ class TestRegisterUserUseCase: repo = FakeUserRepository() use_case = self._make_use_case(repo=repo) - req = RegisterUserRequest( - email="a@b.com", password="StrongPass123!", username="u", display_name="D" - ) + req = RegisterUserRequest(email="a@b.com", password="StrongPass123!", username="u", display_name="D") response, _ = use_case.execute(req) assert response.user_id