Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
leej3 committed Oct 29, 2024
1 parent 1c28826 commit 4cff985
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,30 @@ async def test_upload_path(client, db):
record = asyncio.run(db.invocations.find_one())
assert record is not None, "Saved invocation not found"
saved_invocation = Invocation(**record)
assert saved_invocation["id"] == SAMPLE_INV.id, "IDs do not match"
assert saved_invocation.id == SAMPLE_INV.id, "IDs do not match"
assert (
saved_invocation["work"]["filename"] == SAMPLE_INV.work.filename
saved_invocation.work.filename == SAMPLE_INV.work.filename
), "Work data does not match"
assert (
saved_invocation["client"]["compute_context_id"]
saved_invocation.client.compute_context_id
== SAMPLE_INV.client.compute_context_id
), "Client data does not match"
assert (
saved_invocation["osm_version"] == SAMPLE_INV.osm_version
saved_invocation.osm_version == SAMPLE_INV.osm_version
), "OSM version does not match"
assert (
saved_invocation["user_comment"] == SAMPLE_INV.user_comment
saved_invocation.user_comment == SAMPLE_INV.user_comment
), "User comment does not match"
assert (
saved_invocation["components"][0]["name"] == SAMPLE_INV.components[0].name
saved_invocation.components[0].name == SAMPLE_INV.components[0].name
), "Component name does not match"
assert (
saved_invocation["components"][0]["version"] == SAMPLE_INV.components[0].version
saved_invocation.components[0].version == SAMPLE_INV.components[0].version
), "Component version does not match"
assert saved_invocation["funder"] == SAMPLE_INV.funder, "Funder does not match"
assert (
saved_invocation["data_tags"] == SAMPLE_INV.data_tags
), "Data tags do not match"
assert saved_invocation.funder == SAMPLE_INV.funder, "Funder does not match"
assert saved_invocation.data_tags == SAMPLE_INV.data_tags, "Data tags do not match"
# TODO: fix tzinfo issue
breakpoint()
assert (
saved_invocation["created_at"] == SAMPLE_INV.created_at
saved_invocation.created_at == SAMPLE_INV.created_at
), "Created at does not match"

0 comments on commit 4cff985

Please sign in to comment.