Beispiel #1
0
def test_list():
    add(method=GET,
        url="https://api.mapbox.com" + "/tilesets/v1" + "/user" +
        "?access_token={}".format(ACCESS_TOKEN),
        match_querystring=True,
        body="{\"key\": \"value\"}",
        status=200)

    tilesets = Tilesets(access_token=ACCESS_TOKEN)
    response = tilesets.list()
    assert response.status_code == 200
Beispiel #2
0
def test_list_with_sortby_and_limit():
    add(method=GET,
        url="https://api.mapbox.com" + "/tilesets/v1" +
        "/user?access_token={}".format(ACCESS_TOKEN) + "&sortby=created" +
        "&limit=500",
        match_querystring=True,
        body="{\"key\": \"value\"}",
        status=200)

    tilesets = Tilesets(access_token=ACCESS_TOKEN)
    response = tilesets.list(sortby="created", limit=500)
    assert response.status_code == 200
Beispiel #3
0
def test_list_with_tileset_type_and_visibility():
    add(method=GET,
        url="https://api.mapbox.com" + "/tilesets/v1" + "/user" +
        "?access_token={}".format(ACCESS_TOKEN) + "&type=vector" +
        "&visibility=public",
        match_querystring=True,
        body="{\"key\": \"value\"}",
        status=200)

    tilesets = Tilesets(access_token=ACCESS_TOKEN)
    response = tilesets.list(tileset_type="vector", visibility="public")
    assert response.status_code == 200