Skip to content

Commit

Permalink
Move test after pages are in db
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Jan 30, 2025
1 parent bd2d437 commit 2903878
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions backend/test/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,6 @@ def replaced_upload_id(
return actual_id


def test_uploads_collection_updated(
admin_auth_headers, default_org_id, uploads_collection_id, upload_id
):
# Verify that collection is updated when WACZ is added on upload
r = requests.get(
f"{API_PREFIX}/orgs/{default_org_id}/collections/{uploads_collection_id}",
headers=admin_auth_headers,
)
assert r.status_code == 200
data = r.json()

assert data["crawlCount"] > 0
assert data["pageCount"] > 0
assert data["uniquePageCount"] > 0
assert data["totalSize"] > 0


def test_list_stream_upload(
admin_auth_headers, default_org_id, uploads_collection_id, upload_id
):
Expand Down Expand Up @@ -302,6 +285,23 @@ def test_get_upload_pages(admin_auth_headers, default_org_id, upload_id):
assert data["uniquePageCount"] > 0


def test_uploads_collection_updated(
admin_auth_headers, default_org_id, uploads_collection_id, upload_id
):
# Verify that collection is updated when WACZ is added on upload
r = requests.get(
f"{API_PREFIX}/orgs/{default_org_id}/collections/{uploads_collection_id}",
headers=admin_auth_headers,
)
assert r.status_code == 200
data = r.json()

assert data["crawlCount"] > 0
assert data["pageCount"] > 0
assert data["uniquePageCount"] > 0
assert data["totalSize"] > 0


def test_replace_upload(
admin_auth_headers, default_org_id, uploads_collection_id, upload_id
):
Expand Down

0 comments on commit 2903878

Please sign in to comment.