def test_marker(): add(method=GET, url="https://api.mapbox.com/v4/marker/pin-s.png?access_token=pk.test", match_querystring=True, body="pin-s.png", status=200) maps = Maps(access_token="pk.test") response = maps.marker(marker_name="pin-s") assert response.status_code == 200
def test_marker_with_label_and_retina(): add(method=GET, url= "https://api.mapbox.com/v4/marker/[email protected]?access_token=pk.test", match_querystring=True, body="*****@*****.**", status=200) maps = Maps(access_token="pk.test") response = maps.marker(marker_name="pin-s", label="label", retina=True) assert response.status_code == 200
def test_marker_error(): maps = Maps(access_token="pk.test") with raises(ValidationError) as exception: response = maps.marker()