def test_webservice_parser_get_links(mock_link_test): """ The `sunpy.net.helio.parser.link_test` returns an XML fragment with embedded `accessURL` elements. Ensure that all the `accessURL` are extracted and duplicates discarded. """ hec_links = webservice_parser('http://www.google.com') assert len(hec_links) == 6 assert 'http://helio.uk/hec/HelioService' in hec_links assert 'http://msslkk.uk/hec/HelioService' in hec_links assert 'http://voparis.fr/hec/helio-hec/HelioService' in hec_links assert 'http://hec.eu/helio_hec/HelioService' in hec_links assert 'http://helio.uk/hec/HelioLongQueryService' in hec_links assert 'http://hec.eu/helio_hec/HelioLongQueryService' in hec_links
def test_webservice_parser_no_content(mock_link_test): """ No content from supplied URL? Return None """ assert webservice_parser('http://www.google.com') is None
def test_webservice_parser(): result = webservice_parser() assert isinstance(result, list)
def client(): working_links = list(filter(link_test, webservice_parser())) taverna_link = taverna_parser(working_links[0])[0] return HECClient(taverna_link)