def test_twitter_suspended_account(): info = { "url": "https://twitter.com/account/suspended", "time": "2018-12-17 15:34" } info_type, info_id = id_extractor.extract_twitter_id(info) assert info_type == "suspended" assert info_id == -1
def test_extract_twitter_artist_id_with_query(): info = { "url": "https://twitter.com/gridgrid3?protected_redirect=true", "time": "2018-12-10 09:47", } info_type, info_id = id_extractor.extract_twitter_id(info) assert info_type == "artist" assert info_id == "gridgrid3"
def test_extract_twitter_art_id_with_query(): info = { "url": "https://twitter.com/tziro460/status/1183336121045880832?s=09", "time": "2019-10-13 14:50", } info_type, info_id = id_extractor.extract_twitter_id(info) assert info_type == "art" assert info_id == 1183336121045880832
def test_extract_twitter_art_id(): info = { "url": "https://twitter.com/harimoji/status/863768682274537477", "time": "2017-05-16 12:31", } info_type, info_id = id_extractor.extract_twitter_id(info) assert info_type == "art" assert info_id == 863768682274537477
def test_extract_twitter_art_id_with_selected_image(): info = { "url": "https://twitter.com/kerorira1/status/837980988596592640/photo/1", "time": "2018-11-09 09:51", } info_type, info_id = id_extractor.extract_twitter_id(info) assert info_type == "art" assert info_id == 837980988596592640
def test_extract_twitter_artist_id(): info = {"url": "https://twitter.com/_club_3", "time": "2017-02-17 02:22"} info_type, info_id = id_extractor.extract_twitter_id(info) assert info_type == "artist" assert info_id == "_club_3"