Skip to content
Permalink
Browse files
Add a unit test
  • Loading branch information
pblottiere committed May 19, 2021
1 parent 4017213 commit 6f620bb19e1208220b0d7d95f07c9d92b67e1a56
@@ -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)
@@ -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({
Binary file not shown.

0 comments on commit 6f620bb

Please sign in to comment.