Esempio n. 1
0
def test_route_tiles_kml_maxsq():
    with boddle(params={
            'share_link': "https://www.statshunters.com/share/test",
            'max_sq': "1",
    }):
        kml = statshunters.route_tiles_kml()
        assert kml.startswith("<kml")
        assert len(re.findall("<Polygon", kml)) == 7
Esempio n. 2
0
def test_route_tiles_kml_filter2():
    with boddle(
            params={
                'share_link': "https://www.statshunters.com/share/test",
                'types': 'Ride InlineSkate',
                'individual': "1",
            }):
        kml = statshunters.route_tiles_kml()
        assert kml.startswith("<kml")
        assert len(re.findall("<Polygon", kml)) == 23
Esempio n. 3
0
def test_route_tiles_kml_error():
    with pytest.raises(bottle.HTTPError) as e:
        with boddle():
            statshunters.route_tiles_kml()
    assert e.value.status.startswith('400')