From 82b26b8aaac335869896b548adeb3a8b640a14eb Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 14 Jun 2026 15:33:49 -0400 Subject: [PATCH] test(external): unique seeded artist per host (fix uq_artist_name in sweep test) --- tests/test_external_worker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_external_worker.py b/tests/test_external_worker.py index 220154c..0b3bb7b 100644 --- a/tests/test_external_worker.py +++ b/tests/test_external_worker.py @@ -24,18 +24,19 @@ class _FakeRedis: def _seed(db_sync, *, host="pixeldrain", status="pending"): - artist = Artist(name="Ext Artist", slug="ext-artist") + # Key per host so a single test can seed several (artist name is UNIQUE). + artist = Artist(name=f"Ext {host}", slug=f"ext-{host}") db_sync.add(artist) db_sync.flush() source = Source( artist_id=artist.id, platform="patreon", - url="https://patreon.com/ext", enabled=True, config_overrides={}, + url=f"https://patreon.com/{host}", enabled=True, config_overrides={}, ) db_sync.add(source) db_sync.flush() post = Post( - source_id=source.id, artist_id=artist.id, external_post_id="EXT1", - post_url="https://patreon.com/posts/EXT1", + source_id=source.id, artist_id=artist.id, external_post_id=f"EXT-{host}", + post_url=f"https://patreon.com/posts/{host}", ) db_sync.add(post) db_sync.flush()