Пример #1
0
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
Пример #2
0
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
Пример #3
0
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
Пример #4
0
def test_webservice_parser():
    result = webservice_parser()
    assert isinstance(result, list)
Пример #5
0
def client():
    working_links = list(filter(link_test, webservice_parser()))
    taverna_link = taverna_parser(working_links[0])[0]
    return HECClient(taverna_link)
Пример #6
0
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
Пример #7
0
def test_webservice_parser():
    result = webservice_parser()
    assert isinstance(result, list)