diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-15 02:16:39 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-15 02:21:01 +0200 |
| commit | bdefcd025604f2c3009fe5e0cc01213c2ba62a6a (patch) | |
| tree | eebd34aa234a9148045ca25b00bf7c8039e00ccf /packages/meshbay-hub/tests/test_mail_is_not_a_relay.py | |
| parent | 027e7d55f3bb57ba5150fd77e8f0114a0baf8d5c (diff) | |
| download | meshbay-bdefcd025604f2c3009fe5e0cc01213c2ba62a6a.tar.gz | |
feat(hub): usernames are at least 8 characters at registration
Existing shorter accounts keep signing in. Test usernames padded to match.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XuNrwLf5EFWCMHzfoEvnpm
Diffstat (limited to 'packages/meshbay-hub/tests/test_mail_is_not_a_relay.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_mail_is_not_a_relay.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/meshbay-hub/tests/test_mail_is_not_a_relay.py b/packages/meshbay-hub/tests/test_mail_is_not_a_relay.py index 4e5bd6d..fe6a5ee 100644 --- a/packages/meshbay-hub/tests/test_mail_is_not_a_relay.py +++ b/packages/meshbay-hub/tests/test_mail_is_not_a_relay.py @@ -298,12 +298,12 @@ async def test_the_register_resend_branch_cannot_be_hammered(client, wire): as long as the account stayed pending. """ victim = "bombing-target@example.test" - r = await _register(client, "relay_a", victim) + r = await _register(client, "relay_a_test", victim) assert r.status_code == 201, r.text assert len(wire) == 1 for _ in range(5): - r = await _register(client, "relay_a", victim) + r = await _register(client, "relay_a_test", victim) assert r.status_code == 201, r.text assert len(wire) == 1, f"{len(wire)} mails to one address from one sign-up" @@ -344,7 +344,7 @@ async def test_an_account_may_point_the_hub_at_one_stranger_then_wait( indefinitely, so the delay is long — and a second, different address inside it is refused. """ - headers = await _signed_in(client, db_session, "relay_b", + headers = await _signed_in(client, db_session, "relay_b_test", "relay_b@example.test") before = len(wire) @@ -370,7 +370,7 @@ async def test_the_address_already_pending_may_be_asked_for_again( from meshbay_hub import hub_settings from meshbay_hub.db.models import MailQuota - headers = await _signed_in(client, db_session, "relay_d", + headers = await _signed_in(client, db_session, "relay_d_test", "relay_d@example.test") typo = "jean@gmial.test" @@ -399,7 +399,7 @@ async def test_the_delay_survives_the_verification_row_being_deleted( one, so a window counted from that table would count one, always. Which is what the first version of this counted. It comes off the IP log. """ - headers = await _signed_in(client, db_session, "relay_c", + headers = await _signed_in(client, db_session, "relay_c_test", "relay_c@example.test") r = await client.patch("/v1/users/me", headers=headers, @@ -495,10 +495,10 @@ async def test_a_moderator_may_read_the_bounds_but_not_change_them( from meshbay_hub.db.models import User - headers = await _signed_in(client, db_session, "mailmod", + headers = await _signed_in(client, db_session, "mailmod_test", "mailmod@example.test") await db_session.execute( - update(User).where(User.username == "mailmod").values(role="moderator")) + update(User).where(User.username == "mailmod_test").values(role="moderator")) await db_session.commit() assert (await client.get("/v1/admin/settings", headers=headers)).status_code == 200 |