1
0
socials-util/test/test_extension.py
2024-05-12 16:35:29 +02:00

18 lines
441 B
Python

import aenum
from socials_util import *
def test_extension():
MY_SECRET_SITE = aenum.extend_enum(SocialSiteId, 'MY_SECRET_SITE', 666)
assert MY_SECRET_SITE
assert SocialSiteId.MY_SECRET_SITE
REGEXES.append((r'test(\d+)', MY_SECRET_SITE))
url = 'test123'
result = determine_social_from_url(url)
assert result is not None
assert result.social_site_id == MY_SECRET_SITE
assert result.social_id == '123'