Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Aug 1, 2024
1 parent cfa3669 commit 22b7bc1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/clients/test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ async def test_create_bulk_items_omit_collection(
f"/collections/{coll['id']}/bulk_items",
json=payload,
)
assert resp.status_code == 400
assert resp.status_code == 200
assert resp.text == '"Successfully added 2 items."'

for item_id in items.keys():
Expand Down Expand Up @@ -465,7 +465,10 @@ async def test_create_bulk_items_collection_mismatch(
json=payload,
)
assert resp.status_code == 400
assert resp.text == '"Successfully added 2 items."'
assert (
resp.json()["detail"]
== "Collection ID from path parameter (test-collection) does not match Collection ID from Item (wrong-collection)"
)


async def test_create_bulk_items_id_mismatch(
Expand All @@ -488,7 +491,10 @@ async def test_create_bulk_items_id_mismatch(
json=payload,
)
assert resp.status_code == 400
assert resp.text == '"Successfully added 2 items."'
assert (
resp.json()["detail"]
== "Collection ID from path parameter (test-collection) does not match Collection ID from Item (wrong-collection)"
)


# TODO since right now puts implement upsert
Expand Down

0 comments on commit 22b7bc1

Please sign in to comment.