2023-12-19 22:08:54 +00:00
|
|
|
from socials_util import *
|
|
|
|
import aenum
|
|
|
|
|
2024-03-31 22:37:15 +00:00
|
|
|
|
2023-12-19 22:08:54 +00:00
|
|
|
def test_extension():
|
|
|
|
MY_SECRET_SITE = aenum.extend_enum(SocialSiteId, 'MY_SECRET_SITE', 666)
|
|
|
|
assert MY_SECRET_SITE
|
|
|
|
assert SocialSiteId.MY_SECRET_SITE
|
|
|
|
|
2023-12-22 00:19:09 +00:00
|
|
|
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'
|