77#
88# Copyright (c) 2024 Tom Kralidis
99# Copyright (c) 2022 John A Stevenson and Colin Blackburn
10+ # Copyright (c) 2025 Joana Simoes
1011#
1112# Permission is hereby granted, free of charge, to any person
1213# obtaining a copy of this software and associated documentation
3940from pygeoapi .api import FORMAT_TYPES , F_HTML
4041from pygeoapi .api .tiles import (
4142 get_collection_tiles , tilematrixset ,
42- tilematrixsets , get_collection_tiles_metadata
43+ tilematrixsets , get_collection_tiles_metadata ,
44+ get_collection_tiles_data
4345)
4446from pygeoapi .models .provider .base import TileMatrixSetEnum
4547
@@ -65,6 +67,24 @@ def test_get_collection_tiles(config, api_):
6567 assert len (content ['tilesets' ]) > 0
6668
6769
70+ def test_get_collection_tiles_data (config , api_ ):
71+ req = mock_api_request ({'f' : 'mvt' })
72+ rsp_headers , code , response = get_collection_tiles_data (
73+ api_ , req , 'naturalearth/lakes' ,
74+ matrix_id = 'WebMercatorQuad' , z_idx = 0 , x_idx = 0 , y_idx = 0 )
75+ assert code == HTTPStatus .OK
76+
77+ rsp_headers , code , response = get_collection_tiles_data (
78+ api_ , req , 'naturalearth/lakes' ,
79+ matrix_id = 'WebMercatorQuad' , z_idx = 5 , x_idx = 15 , y_idx = 16 )
80+ assert code == HTTPStatus .NO_CONTENT
81+
82+ rsp_headers , code , response = get_collection_tiles_data (
83+ api_ , req , 'naturalearth/lakes' ,
84+ matrix_id = 'WebMercatorQuad' , z_idx = 0 , x_idx = 1 , y_idx = 1 )
85+ assert code == HTTPStatus .NOT_FOUND
86+
87+
6888def test_tilematrixsets (config , api_ ):
6989 req = mock_api_request ()
7090 rsp_headers , code , response = tilematrixsets (api_ , req )
0 commit comments