Skip to content

Commit

Permalink
Followup b10e708, fix failing PyQgsServerAccessControl test on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 24, 2015
1 parent cac9c9e commit c7c71d9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/src/python/test_qgsserver_accesscontrol.py
Expand Up @@ -163,7 +163,7 @@ def setUp(self):
if k in environ:
del environ[k]

self.projectPath = urllib.quote( path.join(self.testdata_path, "project.qgs") )
self.projectPath = urllib.quote(path.join(self.testdata_path, "project.qgs"))

def tearDown(self):
copyfile(path.join(self.testdata_path, "_helloworld.db"), path.join(self.testdata_path, "helloworld.db"))
Expand Down Expand Up @@ -871,7 +871,8 @@ def test_wms_getfeatureinfo_subsetstring(self):
"FEATURE_COUNT": "10",
"INFO_FORMAT": "application/vnd.ogc.gml",
"X": "56",
"Y": "144"
"Y": "144",
"MAP": self.projectPath
}.items()])

response, headers = self._get_fullaccess(query_string)
Expand Down Expand Up @@ -906,7 +907,8 @@ def test_wms_getfeatureinfo_subsetstring2(self):
"FEATURE_COUNT": "10",
"INFO_FORMAT": "application/vnd.ogc.gml",
"X": "146",
"Y": "160"
"Y": "160",
"MAP": self.projectPath
}.items()])

response, headers = self._get_fullaccess(query_string)
Expand Down Expand Up @@ -1002,17 +1004,21 @@ def _get_restricted(self, query_string):
def _post_fullaccess(self, data, query_string=None):
environ["REQUEST_METHOD"] = "POST"
environ["REQUEST_BODY"] = data
environ["QGIS_PROJECT_FILE"] = self.projectPath
result = self._handle_request(False, query_string)
del environ["REQUEST_METHOD"]
del environ["REQUEST_BODY"]
del environ["QGIS_PROJECT_FILE"]
return result

def _post_restricted(self, data, query_string=None):
environ["REQUEST_METHOD"] = "POST"
environ["REQUEST_BODY"] = data
environ["QGIS_PROJECT_FILE"] = self.projectPath
result = self._handle_request(True, query_string)
del environ["REQUEST_METHOD"]
del environ["REQUEST_BODY"]
del environ["QGIS_PROJECT_FILE"]
return result

def _img_diff(self, image, control_image, max_diff, max_size_diff=QSize()):
Expand Down

0 comments on commit c7c71d9

Please sign in to comment.