Skip to content

Commit

Permalink
chore: Correct resource name in sideloading test integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
asgeirrr committed Dec 13, 2024
1 parent 826fcd5 commit a419002
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,18 +379,18 @@ async def test_fetch_all_filters(client, httpx_mock):
async def test_fetch_all_sideload(client, httpx_mock):
httpx_mock.add_response(
method="GET",
url="https://elis.rossum.ai/api/v1/workspaces?page_size=100&sideload=content,automation_blockers&content.schema_id=invoice_id,date_issue&ordering=",
url="https://elis.rossum.ai/api/v1/annotations?page_size=100&sideload=content,automation_blockers&content.schema_id=invoice_id,date_issue&ordering=",
json={
"pagination": {"total": 3, "total_pages": 1, "next": None, "previous": None},
"results": ANNOTATIONS,
"content": CONTENT,
"automation_blockers": AUTOMATION_BLOCKERS,
},
)
workspaces = [
annotations = [
w
async for w in client.fetch_all(
Resource.Workspace,
Resource.Annotation,
sideloads=["content", "automation_blockers"],
content_schema_ids=["invoice_id", "date_issue"],
)
Expand All @@ -403,7 +403,7 @@ async def test_fetch_all_sideload(client, httpx_mock):
expected_annotations[1]["automation_blocker"] = AUTOMATION_BLOCKERS[0]
expected_annotations[2]["content"] = []

assert workspaces == expected_annotations
assert annotations == expected_annotations


@pytest.mark.asyncio
Expand Down

0 comments on commit a419002

Please sign in to comment.