diff --git a/tests/test_discord_grouping.py b/tests/test_discord_grouping.py index f5e3fe3..928c197 100644 --- a/tests/test_discord_grouping.py +++ b/tests/test_discord_grouping.py @@ -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