What you pay for, what Discord drops, and pixiv switched off #251
@@ -367,7 +367,14 @@ async def test_the_sweep_is_a_no_op_when_the_switch_is_off(db):
|
|||||||
await db.commit()
|
await db.commit()
|
||||||
|
|
||||||
result = await sweep(db)
|
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
|
@pytest.mark.asyncio
|
||||||
|
|||||||
Reference in New Issue
Block a user