Unit test for rss link

main
Bob Mottram 2022-01-13 22:37:53 +00:00
parent f8ee7e4da5
commit 7a04a9f323
1 changed files with 10 additions and 0 deletions

View File

@ -6477,6 +6477,16 @@ def _test_get_link_from_rss_item() -> None:
assert link.startswith('https://anchor.fm')
assert not mime_type
rss_item = \
'<link href="' + \
'https://test.link/creativecommons/episodes/' + \
'Hessel-van-Oorschot-of-Tribe-of-Noise--Free-Music-Archive-e1crvce' + \
'"/>' + \
'<pubDate>Wed, 12 Jan 2022 14:28:46 GMT</pubDate>'
link, mime_type = get_link_from_rss_item(rss_item)
assert link
assert link.startswith('https://test.link/creativecommons')
def run_all_tests():
base_dir = os.getcwd()