Skip to content

Commit c7c71d9

Browse files
committed
Followup b10e708, fix failing PyQgsServerAccessControl test on Travis
1 parent cac9c9e commit c7c71d9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/src/python/test_qgsserver_accesscontrol.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def setUp(self):
163163
if k in environ:
164164
del environ[k]
165165

166-
self.projectPath = urllib.quote( path.join(self.testdata_path, "project.qgs") )
166+
self.projectPath = urllib.quote(path.join(self.testdata_path, "project.qgs"))
167167

168168
def tearDown(self):
169169
copyfile(path.join(self.testdata_path, "_helloworld.db"), path.join(self.testdata_path, "helloworld.db"))
@@ -871,7 +871,8 @@ def test_wms_getfeatureinfo_subsetstring(self):
871871
"FEATURE_COUNT": "10",
872872
"INFO_FORMAT": "application/vnd.ogc.gml",
873873
"X": "56",
874-
"Y": "144"
874+
"Y": "144",
875+
"MAP": self.projectPath
875876
}.items()])
876877

877878
response, headers = self._get_fullaccess(query_string)
@@ -906,7 +907,8 @@ def test_wms_getfeatureinfo_subsetstring2(self):
906907
"FEATURE_COUNT": "10",
907908
"INFO_FORMAT": "application/vnd.ogc.gml",
908909
"X": "146",
909-
"Y": "160"
910+
"Y": "160",
911+
"MAP": self.projectPath
910912
}.items()])
911913

912914
response, headers = self._get_fullaccess(query_string)
@@ -1002,17 +1004,21 @@ def _get_restricted(self, query_string):
10021004
def _post_fullaccess(self, data, query_string=None):
10031005
environ["REQUEST_METHOD"] = "POST"
10041006
environ["REQUEST_BODY"] = data
1007+
environ["QGIS_PROJECT_FILE"] = self.projectPath
10051008
result = self._handle_request(False, query_string)
10061009
del environ["REQUEST_METHOD"]
10071010
del environ["REQUEST_BODY"]
1011+
del environ["QGIS_PROJECT_FILE"]
10081012
return result
10091013

10101014
def _post_restricted(self, data, query_string=None):
10111015
environ["REQUEST_METHOD"] = "POST"
10121016
environ["REQUEST_BODY"] = data
1017+
environ["QGIS_PROJECT_FILE"] = self.projectPath
10131018
result = self._handle_request(True, query_string)
10141019
del environ["REQUEST_METHOD"]
10151020
del environ["REQUEST_BODY"]
1021+
del environ["QGIS_PROJECT_FILE"]
10161022
return result
10171023

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

0 commit comments

Comments
 (0)