fix(test): drop stale 'starts at 0' assertion after auto-arm-on-create
CI / lint (push) Successful in 2s
CI / backend-lint-and-test (push) Successful in 12s
CI / frontend-build (push) Successful in 28s
CI / intimp (push) Successful in 3m36s
CI / intapi (push) Successful in 7m59s
CI / intcore (push) Successful in 9m32s

`test_set_backfill_runs_arms_source` was pinning the pre-auto-arm initial
value (0) when checking that the override works. Now that create() pre-arms
enabled sources to 3, the assertion is stale — the test was already
verifying the override path, the pre-assertion just decorated it.

Drop the pre-assertion; keep the override check. Other tests use raw
Source(...) constructors (default to 0 via the column server_default),
not SourceService.create(), so they're unaffected.
This commit is contained in:
2026-06-01 20:12:55 -04:00
parent 2aa2002f22
commit cfa4fb4084
+3 -3
View File
@@ -176,15 +176,15 @@ async def test_list_hides_sidecar_synthetic_anchors(db):
@pytest.mark.asyncio
async def test_set_backfill_runs_arms_source(db):
"""The service method sets backfill_runs_remaining and returns the
updated record so the API can echo it back."""
"""The service method overrides backfill_runs_remaining (regardless of
the auto-arm-on-create starting value) and returns the updated record
so the API can echo it back."""
artist = await _artist(db, "Alice")
svc = SourceService(db)
rec = await svc.create(
artist_id=artist.id, platform="patreon",
url="https://patreon.com/alice",
)
assert rec.backfill_runs_remaining == 0
updated = await svc.set_backfill_runs(rec.id, 5)
assert updated.backfill_runs_remaining == 5