def test_find_image_urls_none(): article_json = { 'version': [ { 'content': 'test this url: http://www.google.com' } ] } image_urls = aiodcard.find_image_urls(article_json) assert image_urls == []
def test_find_image_urls_multiple_mixed(): article_json = { 'version': [ { 'content': 'test http://xxxx.com/aaa.jpg end, another: http://imgur.com/aaaaa' } ] } image_urls = aiodcard.find_image_urls(article_json) assert image_urls[0] == 'http://xxxx.com/aaa.jpg' and image_urls[1] == 'http://imgur.com/aaaaa'