aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_group_purge.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-15 02:16:39 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-15 02:21:01 +0200
commitbdefcd025604f2c3009fe5e0cc01213c2ba62a6a (patch)
treeeebd34aa234a9148045ca25b00bf7c8039e00ccf /packages/meshbay-hub/tests/test_group_purge.py
parent027e7d55f3bb57ba5150fd77e8f0114a0baf8d5c (diff)
downloadmeshbay-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_group_purge.py')
-rw-r--r--packages/meshbay-hub/tests/test_group_purge.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/meshbay-hub/tests/test_group_purge.py b/packages/meshbay-hub/tests/test_group_purge.py
index e05c374..0611dba 100644
--- a/packages/meshbay-hub/tests/test_group_purge.py
+++ b/packages/meshbay-hub/tests/test_group_purge.py
@@ -101,7 +101,7 @@ def test_the_seeding_covers_every_reference():
async def test_enforcement_is_really_on(client, db_session):
"""The control: without it, every test below would pass on SQLite's
default and prove nothing about PostgreSQL."""
- owner = await _account(client, "control")
+ owner = await _account(client, "control_test")
await _account(client, "control_member")
gid = await _group_with_everything(client, db_session, owner, "control_member", "control")
await _enforce_foreign_keys(db_session)
@@ -121,16 +121,16 @@ async def test_an_admin_erases_an_account_that_owns_groups(client, db_session, m
monkeypatch.setattr("meshbay_hub.api.revocation.broadcast_revocation", capture)
admin_token = await _account(client, "the_admin")
- owner_token = await _account(client, "owner")
- await _account(client, "member")
+ owner_token = await _account(client, "owner_test")
+ await _account(client, "member_test")
admin = await db_session.get(User, await _uid(db_session, "the_admin"))
admin.role = "admin"
await db_session.commit()
- first = await _group_with_everything(client, db_session, owner_token, "member", "first")
+ first = await _group_with_everything(client, db_session, owner_token, "member_test", "first")
r = await client.post("/v1/groups", json={"name": "second"},
headers={"Authorization": f"Bearer {owner_token}"})
second = r.json()["group_id"]
- owner_id = await _uid(db_session, "owner")
+ owner_id = await _uid(db_session, "owner_test")
await _enforce_foreign_keys(db_session)
r = await client.delete(f"/v1/admin/users/{owner_id}",
@@ -156,9 +156,9 @@ async def test_an_admin_erases_an_account_that_owns_groups(client, db_session, m
async def test_the_owner_deletes_a_group_with_everything_pointing_at_it(client, db_session):
"""The owner's route left `email_verifications` behind — an IntegrityError
on PostgreSQL the first time an invited group was deleted."""
- owner_token = await _account(client, "keeper")
- await _account(client, "guest")
- gid = await _group_with_everything(client, db_session, owner_token, "guest", "doomed")
+ owner_token = await _account(client, "keeper_test")
+ await _account(client, "guest_test")
+ gid = await _group_with_everything(client, db_session, owner_token, "guest_test", "doomed")
await _enforce_foreign_keys(db_session)
r = await client.delete(f"/v1/groups/{gid}",