Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a unit test
  • Loading branch information
pblottiere committed May 19, 2021
1 parent 4017213 commit 6f620bb
Show file tree
Hide file tree
Showing 3 changed files with 715 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/src/python/test_qgsserver_wmts.py
Expand Up @@ -45,9 +45,10 @@ class TestQgsServerWMTS(QgsServerTestBase):
# Set to True to re-generate reference files for this class
regenerate_reference = False

def wmts_request_compare(self, request, version='', extra_query_string='', reference_base_name=None):
def wmts_request_compare(self, request, version='', extra_query_string='', reference_base_name=None, project=None):
# project = self.testdata_path + "test_project_wfs.qgs"
project = self.projectGroupsPath
if not project:
project = self.projectGroupsPath
assert os.path.exists(project), "Project file not found: " + project

query_string = '?MAP=%s&SERVICE=WMTS&REQUEST=%s' % (urllib.parse.quote(project), request)
Expand Down Expand Up @@ -118,6 +119,10 @@ def test_project_wmts(self):
self.wmts_request_compare(request)
# self.wmts_request_compare(request, '1.0.0')

def test_getcapabilities_epsg_axis_inverted(self):
project = os.path.join(self.testdata_path, "test_project_wmts_epsg_axis_inverted.qgz")
self.wmts_request_compare('GetCapabilities', project=project, reference_base_name="wmts_getcapabilities_axis_inverted")

def test_wmts_gettile(self):
# Testing project WMTS layer
qs = "?" + "&".join(["%s=%s" % i for i in list({
Expand Down
Binary file not shown.

0 comments on commit 6f620bb

Please sign in to comment.