Skip to content

Commit 9d3690c

Browse files
committed
test: reconcile file_storage/branding tests with #401 and #404 on main
Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
1 parent 8878fe8 commit 9d3690c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎modules/branding/tests/test_branding_reap_ordering.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ async def delete(key):
8080
monkeypatch.setattr(backend, "delete", delete)
8181
await reaper.reap(app, file_id, tenant_id=a.tenant_id)
8282

83-
assert events == ["commit", "delete"]
83+
# The original and any cached thumbnail variants: every delete after the commit.
84+
assert events[0] == "commit" and "delete" in events
85+
assert set(events[1:]) == {"delete"}
8486
assert (await _row(app, file_id)).is_deleted is True
8587

8688

‎modules/file_storage/tests/test_file_storage_public_cookieless.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ async def test_file_storage_signed_in_session_survives_public_fetch(authenticate
8181

8282
async def test_file_storage_other_routes_keep_session_behaviour(client):
8383
"""Only the public file reads are cookieless; an anonymous page still writes it."""
84-
resp = await client.get("/users/login")
84+
# A real page load (Accept: text/html) — anonymous non-page calls stay cookieless (#349).
85+
resp = await client.get("/users/login", headers={"Accept": "text/html"})
8586
assert resp.status_code == 200
8687
assert resp.headers.get("set-cookie", "").startswith("session=")

0 commit comments

Comments
 (0)