def test_loading_high_low_tide_comp(client: FlaskClient):
    html = get_html(client, "/high_tide_comp_20p/2008")

    assert html.search('High Tide 20 percentage composites for entire coastline') is not None

    check_dataset_count(html, 306)
    # Footprint is not exact due to shapely.simplify()
    check_area('2,984,...km2', html)

    assert html.find('.last-processed time', first=True).attrs['datetime'] == '2017-06-08T20:58:07.014314+00:00'
Beispiel #2
0
def test_loading_high_low_tide_comp(client: FlaskClient):
    html = get_html(client, "/high_tide_comp_20p/2008")

    assert (
        html.search("High Tide 20 percentage composites for entire coastline")
        is not None)

    check_dataset_count(html, 306)
    # Footprint is not exact due to shapely.simplify()
    check_area("2,984,...km2", html)

    assert (one_element(html, ".last-processed time").attrs["datetime"] ==
            "2017-06-08T20:58:07.014314+00:00")
def test_get_overview(client: FlaskClient):
    html = get_html(client, "/wofs_albers")
    check_dataset_count(html, 11)
    check_last_processed(html, "2018-05-20T11:25:35")
    assert "wofs_albers whole collection" in _h1_text(html)
    check_area("61,...km2", html)

    html = get_html(client, "/wofs_albers/2017")

    check_dataset_count(html, 11)
    check_last_processed(html, "2018-05-20T11:25:35")
    assert "wofs_albers across 2017" in _h1_text(html)

    html = get_html(client, "/wofs_albers/2017/04")
    check_dataset_count(html, 4)
    check_last_processed(html, "2018-05-20T09:36:57")
    assert "wofs_albers across April 2017" in _h1_text(html)
    check_area("30,...km2", html)
def test_get_overview(client: FlaskClient):
    html = get_html(client, '/wofs_albers')
    check_dataset_count(html, 11)
    check_last_processed(html, '2018-05-20T11:25:35')
    assert 'wofs_albers whole collection' in _h1_text(html)
    check_area('61,...km2', html)

    html = get_html(client, '/wofs_albers/2017')

    check_dataset_count(html, 11)
    check_last_processed(html, '2018-05-20T11:25:35')
    assert 'wofs_albers across 2017' in _h1_text(html)

    html = get_html(client, '/wofs_albers/2017/04')
    check_dataset_count(html, 4)
    check_last_processed(html, '2018-05-20T09:36:57')
    assert 'wofs_albers across April 2017' in _h1_text(html)
    check_area('30,...km2', html)