aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_recovery_email.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_recovery_email.py')
-rw-r--r--packages/meshbay-hub/tests/test_recovery_email.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/test_recovery_email.py b/packages/meshbay-hub/tests/test_recovery_email.py
index e4288a1..c6dab97 100644
--- a/packages/meshbay-hub/tests/test_recovery_email.py
+++ b/packages/meshbay-hub/tests/test_recovery_email.py
@@ -31,7 +31,12 @@ def _skip_email_verification(monkeypatch):
run so the e-mail is actually built. Capture it instead of sending.
"""
sent = []
- monkeypatch.setattr("meshbay_hub.mail._send", lambda msg: sent.append(msg) or True)
+ # `**_` swallows the `purpose` keyword `_send` now requires — the gate
+ # that keeps this hub off the open-relay list. What this module is
+ # about is the body of the message, so the gate is stubbed away with
+ # the socket; `test_mail_is_not_a_relay.py` is where it is exercised.
+ monkeypatch.setattr("meshbay_hub.mail._send",
+ lambda msg, **_: sent.append(msg) or True)
return sent
@@ -84,7 +89,7 @@ async def test_the_recovery_key_is_not_persisted(
def test_mail_body_with_and_without_the_key(monkeypatch):
captured = []
monkeypatch.setattr("meshbay_hub.mail._send",
- lambda msg: captured.append(msg) or True)
+ lambda msg, **_: captured.append(msg) or True)
mail.send_verification_code("x@example.com", "123456",
recovery_key="MY-RECOVERY-KEY")