API - minor fix
This commit is contained in:
parent
cb70e8c458
commit
aeb8360316
@ -7,12 +7,13 @@ from fittrackee.workouts.utils.maps import get_static_map_tile_server_url
|
|||||||
|
|
||||||
class TestGetStaticMapTileServerUrl:
|
class TestGetStaticMapTileServerUrl:
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'input_tile_server_url,input_tile_server_subdomains,'
|
'input_tile_server_url,'
|
||||||
|
'input_tile_server_subdomains,'
|
||||||
'expected_tile_server_url',
|
'expected_tile_server_url',
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
None,
|
'',
|
||||||
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@ -22,7 +23,7 @@ class TestGetStaticMapTileServerUrl:
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
None,
|
'',
|
||||||
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@ -48,9 +49,8 @@ class TestGetStaticMapTileServerUrl:
|
|||||||
== expected_tile_server_url
|
== expected_tile_server_url
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_it_returns_tile_server_url_with_random_submain_when_multiple_provided( # noqa
|
def test_it_returns_tile_server_url_with_random_subdomain(self) -> None:
|
||||||
self,
|
"""in case multiple subdomains are provided"""
|
||||||
) -> None:
|
|
||||||
tile_config = {
|
tile_config = {
|
||||||
'URL': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'URL': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
'STATICMAP_SUBDOMAINS': 'a,b,c',
|
'STATICMAP_SUBDOMAINS': 'a,b,c',
|
||||||
|
Loading…
Reference in New Issue
Block a user