umap/umap/tests/test_tilelayer.py
2023-11-24 23:31:18 +01:00

27 lines
603 B
Python

import pytest
from .base import TileLayerFactory
pytestmark = pytest.mark.django_db
def test_tilelayer_json():
tilelayer = TileLayerFactory(
attribution="Attribution",
maxZoom=19,
minZoom=0,
name="Name",
rank=1,
tms=True,
url_template="http://{s}.x.fr/{z}/{x}/{y}",
)
assert tilelayer.json == {
"attribution": "Attribution",
"id": tilelayer.id,
"maxZoom": 19,
"minZoom": 0,
"name": "Name",
"rank": 1,
"tms": True,
"url_template": "http://{s}.x.fr/{z}/{x}/{y}",
}