test: whole-table tag counts become non-system counts
The four remaining run-1895 failures were stale expectations, not predicate bugs — prune/reset returned the right counts, but these tests verified no-deletion by counting the ENTIRE tag table (or asserting the full kind set), which now includes the three seeded hygiene tags that survive prunes and resets by design. Filter is_system=false with a pointer to #128 so future system tags cannot re-break them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
This commit is contained in:
@@ -660,8 +660,10 @@ async def test_reset_content_tagging_apply_requires_confirm_token(client, db):
|
||||
for bad in ({"dry_run": False}, {"dry_run": False, "confirm": "deadbeef"}):
|
||||
resp = await client.post("/api/admin/tags/reset-content", json=bad)
|
||||
assert resp.status_code == 400
|
||||
# Non-system only: the seeded hygiene tags (#128) survive a reset by
|
||||
# design, so they'd inflate a whole-table count.
|
||||
remaining = (await db.execute(
|
||||
select(func.count()).select_from(Tag)
|
||||
select(func.count()).select_from(Tag).where(Tag.is_system.is_(False))
|
||||
)).scalar_one()
|
||||
assert remaining == 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user