refactor: improve code readability by formatting arguments across multiple files
Test / test (push) Successful in 15s

This commit is contained in:
Artem Kashaev
2025-12-01 16:25:30 +05:00
parent dc0046c730
commit 1dd7c2f2b8
22 changed files with 161 additions and 49 deletions
+28 -7
View File
@@ -61,7 +61,10 @@ async def test_list_user_organizations_returns_memberships(
) -> None:
async with session_factory() as session:
user = User(
email="owner@example.com", hashed_password="hashed", name="Owner", is_active=True,
email="owner@example.com",
hashed_password="hashed",
name="Owner",
is_active=True,
)
session.add(user)
await session.flush()
@@ -115,10 +118,16 @@ async def test_owner_can_add_member_to_organization(
) -> None:
async with session_factory() as session:
owner = User(
email="owner-add@example.com", hashed_password="hashed", name="Owner", is_active=True,
email="owner-add@example.com",
hashed_password="hashed",
name="Owner",
is_active=True,
)
invitee = User(
email="new-member@example.com", hashed_password="hashed", name="Member", is_active=True,
email="new-member@example.com",
hashed_password="hashed",
name="Member",
is_active=True,
)
session.add_all([owner, invitee])
await session.flush()
@@ -220,10 +229,16 @@ async def test_member_role_cannot_add_users(
) -> None:
async with session_factory() as session:
member_user = User(
email="member@example.com", hashed_password="hashed", name="Member", is_active=True,
email="member@example.com",
hashed_password="hashed",
name="Member",
is_active=True,
)
invitee = User(
email="invitee@example.com", hashed_password="hashed", name="Invitee", is_active=True,
email="invitee@example.com",
hashed_password="hashed",
name="Invitee",
is_active=True,
)
session.add_all([member_user, invitee])
await session.flush()
@@ -266,10 +281,16 @@ async def test_cannot_add_duplicate_member(
) -> None:
async with session_factory() as session:
owner = User(
email="dup-owner@example.com", hashed_password="hashed", name="Owner", is_active=True,
email="dup-owner@example.com",
hashed_password="hashed",
name="Owner",
is_active=True,
)
invitee = User(
email="dup-member@example.com", hashed_password="hashed", name="Invitee", is_active=True,
email="dup-member@example.com",
hashed_password="hashed",
name="Invitee",
is_active=True,
)
session.add_all([owner, invitee])
await session.flush()