aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_group_name_unique.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_group_name_unique.py')
-rw-r--r--packages/meshbay-hub/tests/test_group_name_unique.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/meshbay-hub/tests/test_group_name_unique.py b/packages/meshbay-hub/tests/test_group_name_unique.py
index 2bc109c..ff9d42d 100644
--- a/packages/meshbay-hub/tests/test_group_name_unique.py
+++ b/packages/meshbay-hub/tests/test_group_name_unique.py
@@ -30,10 +30,10 @@ async def _create(client, headers, name):
@pytest.mark.asyncio
async def test_same_owner_same_name_is_refused(client):
- alice = await _user(client, "alice")
+ alice = await _user(client, "alice_test")
r1 = await _create(client, alice, "photos")
assert r1.status_code == 201
- assert r1.json()["owner_username"] == "alice"
+ assert r1.json()["owner_username"] == "alice_test"
r2 = await _create(client, alice, "photos")
assert r2.status_code == 409
@@ -42,22 +42,22 @@ async def test_same_owner_same_name_is_refused(client):
@pytest.mark.asyncio
async def test_same_owner_different_case_is_refused(client):
- alice = await _user(client, "alice")
+ alice = await _user(client, "alice_test")
assert (await _create(client, alice, "Photos")).status_code == 201
assert (await _create(client, alice, " photos ")).status_code == 409
@pytest.mark.asyncio
async def test_two_owners_may_share_a_name(client):
- alice = await _user(client, "alice")
- bob = await _user(client, "bob")
+ alice = await _user(client, "alice_test")
+ bob = await _user(client, "bob_test")
assert (await _create(client, alice, "photos")).status_code == 201
assert (await _create(client, bob, "photos")).status_code == 201
@pytest.mark.asyncio
async def test_name_is_trimmed_on_create(client):
- alice = await _user(client, "alice")
+ alice = await _user(client, "alice_test")
r = await _create(client, alice, " spaced out ")
assert r.status_code == 201
assert r.json()["name"] == "spaced out"
@@ -65,14 +65,14 @@ async def test_name_is_trimmed_on_create(client):
@pytest.mark.asyncio
async def test_blank_name_is_refused(client):
- alice = await _user(client, "alice")
+ alice = await _user(client, "alice_test")
assert (await _create(client, alice, " ")).status_code == 422
@pytest.mark.asyncio
async def test_owner_username_is_reported_in_listings(client):
- alice = await _user(client, "alice")
+ alice = await _user(client, "alice_test")
await _create(client, alice, "photos")
mine = (await client.get("/v1/groups/mine", headers=alice)).json()["groups"]
- assert mine and mine[0]["owner_username"] == "alice"
+ assert mine and mine[0]["owner_username"] == "alice_test"