Skip to content

Commit

Permalink
test: list_workspaces_me with all roles
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobartt committed Jul 13, 2023
1 parent 9a53bfc commit 5341a40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/client/sdk/v1/workspaces/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def test_get_workspace(role: UserRole) -> None:


@pytest.mark.asyncio
@pytest.mark.parametrize("role", [UserRole.admin, UserRole.owner])
@pytest.mark.parametrize("role", [UserRole.owner, UserRole.admin, UserRole.annotator])
async def test_list_workspaces_me(role: UserRole) -> None:
workspaces = await WorkspaceFactory.create_batch(size=5)
user = await UserFactory.create(role=role, workspaces=workspaces)
Expand Down
4 changes: 2 additions & 2 deletions tests/server/api/v1/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def test_get_workspace_with_nonexistent_workspace_id(client: TestClient, o


@pytest.mark.asyncio
@pytest.mark.parametrize("role", [UserRole.annotator, UserRole.admin, UserRole.annotator])
@pytest.mark.parametrize("role", [UserRole.owner, UserRole.admin, UserRole.annotator])
async def test_list_workspaces_me(client: TestClient, role: UserRole) -> None:
workspaces = await WorkspaceFactory.create_batch(size=5)
user = await UserFactory.create(role=role, workspaces=workspaces)
Expand All @@ -104,7 +104,7 @@ async def test_list_workspaces_me_without_authentication(client: TestClient) ->


@pytest.mark.asyncio
@pytest.mark.parametrize("role", [UserRole.annotator, UserRole.admin, UserRole.annotator])
@pytest.mark.parametrize("role", [UserRole.owner, UserRole.admin, UserRole.annotator])
async def test_list_workspaces_me_no_workspaces(client: TestClient, role: UserRole) -> None:
user = await UserFactory.create(role=role)

Expand Down

0 comments on commit 5341a40

Please sign in to comment.