What you pay for, what Discord drops, and pixiv switched off #251
@@ -1244,9 +1244,9 @@ def sync_memberships() -> str:
|
||||
"""
|
||||
import asyncio
|
||||
|
||||
from ..services.artist_membership_service import rescan as membership_rescan
|
||||
from ..services.credential_crypto import CredentialCrypto
|
||||
from ..services.credential_service import CredentialService
|
||||
from ..services.artist_membership_service import rescan as membership_rescan
|
||||
from ..services.membership_roster import sync_platform
|
||||
from ..services.patreon_client import PatreonClient
|
||||
from ._async_session import async_session_factory
|
||||
|
||||
@@ -181,13 +181,21 @@ async def test_an_artist_with_no_sources_at_all_is_never_proposed(db):
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_weak_name_needs_the_declaration(db):
|
||||
artist = await _artist_with_discord(db, "Maewix", "maewix")
|
||||
m = await _membership(db, display_name="Maewix Studios Official")
|
||||
# BOTH identity fields must be weak, or the test contradicts itself: the
|
||||
# first draft left the default vanity exactly matching the artist slug, so
|
||||
# the name signal was legitimately 1.0 and the code was right to propose.
|
||||
# CI caught it — a test bug, not a code bug.
|
||||
m = await _membership(
|
||||
db, display_name="Maewix Studios Official",
|
||||
details={"campaign": {"vanity": "maewixstudios"}},
|
||||
url="https://www.patreon.com/maewixstudios",
|
||||
)
|
||||
await db.commit()
|
||||
assert await ArtistMembershipService(db).match_membership(m.id) == 0
|
||||
|
||||
db.add(Post(
|
||||
artist_id=artist.id, source_id=None, external_post_id="p1",
|
||||
description='<a href="https://www.patreon.com/maewix">my patreon</a>',
|
||||
description='<a href="https://www.patreon.com/maewixstudios">mine</a>',
|
||||
post_date=datetime.now(UTC),
|
||||
))
|
||||
await db.commit()
|
||||
|
||||
Reference in New Issue
Block a user