What you pay for, what Discord drops, and pixiv switched off #251

Merged
bvandeusen merged 37 commits from dev into main 2026-09-13 12:09:28 -04:00
Showing only changes of commit ba96ecfb2d - Show all commits
+8 -1
View File
@@ -367,7 +367,14 @@ async def test_the_sweep_is_a_no_op_when_the_switch_is_off(db):
await db.commit()
result = await sweep(db)
assert result == {"enabled": False, "sources": 0, "posts_created": 0}
# Exact equality on purpose, not a subset check: a disabled sweep reports a
# COMPLETE zeroed shape rather than a shorter one, so a caller can read any
# counter unconditionally. (Today's caller short-circuits on `enabled`, so
# nothing would KeyError — the point is that it does not HAVE to.) E3 adding
# `images_joined` broke this assertion, which is exactly what it is for.
assert result == {
"enabled": False, "sources": 0, "posts_created": 0, "images_joined": 0,
}
@pytest.mark.asyncio