Skip to content

Commit

Permalink
fix(test): assign workspaces to admin & annotator only
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobartt committed Jul 13, 2023
1 parent 5341a40 commit 08a9a64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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 @@ -39,7 +39,7 @@ async def test_get_workspace(role: UserRole) -> None:
@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)
user = await UserFactory.create(role=role, workspaces=workspaces if role != UserRole.owner else [])

httpx_client = ArgillaSingleton.init(api_key=user.api_key).http_client.httpx

Expand Down
2 changes: 1 addition & 1 deletion tests/server/api/v1/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def test_get_workspace_with_nonexistent_workspace_id(client: TestClient, o
@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)
user = await UserFactory.create(role=role, workspaces=workspaces if role != UserRole.owner else [])

response = client.get("/api/v1/me/workspaces", headers={API_KEY_HEADER_NAME: user.api_key})

Expand Down

0 comments on commit 08a9a64

Please sign in to comment.