Skip to content

Commit

Permalink
[Test] Server: Fixing concatenation of Path in TestQgsServerWMSTestBase
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Sep 7, 2019
1 parent cc58cba commit b02f519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsserver_wms.py
Expand Up @@ -48,7 +48,7 @@ class TestQgsServerWMSTestBase(QgsServerTestBase):
regenerate_reference = False

def wms_request(self, request, extra=None, project='test_project.qgs', version='1.3.0'):
project = self.testdata_path + project
project = os.path.join(self.testdata_path, project)
assert os.path.exists(project), "Project file not found: " + project
query_string = 'https://www.qgis.org/?MAP=%s&SERVICE=WMS&VERSION=%s&REQUEST=%s' % (urllib.parse.quote(project), version, request)
if extra is not None:
Expand All @@ -59,7 +59,7 @@ def wms_request(self, request, extra=None, project='test_project.qgs', version='
def wms_request_compare(self, request, extra=None, reference_file=None, project='test_project.qgs', version='1.3.0', ignoreExtent=False, normalizeJson=False):
response_header, response_body, query_string = self.wms_request(request, extra, project, version)
response = response_header + response_body
reference_path = self.testdata_path + (request.lower() if not reference_file else reference_file) + '.txt'
reference_path = os.path.join(self.testdata_path, (request.lower() if not reference_file else reference_file) + '.txt')
self.store_reference(reference_path, response)
f = open(reference_path, 'rb')
expected = f.read()
Expand Down

0 comments on commit b02f519

Please sign in to comment.