def test_clean_url__extract_url_from_tag_single_quote(): """ Test that url is correctly from an invalid HTML tag which appears in ESPOO API URL """ tag = "<a href='%s' target='_blank'>Lippupiste</a>" % URL assert clean_url(tag) == URL
def test_clean_url__return_url_stripped(): assert clean_url(" %s " % URL) == URL
def test_clean_url__extract_url_from_tag(): tag = "<a href=\"%s\" target=\"_blank\">Lippupiste</a>" % URL assert clean_url(tag) == URL
def test_clean_url__return_url_if_no_tag(): assert clean_url(URL) == URL