@@ -187,7 +187,7 @@ def wms_request_compare(self, request, extra=None, reference_file=None):
187
187
188
188
def test_project_wms (self ):
189
189
"""Test some WMS request"""
190
- for request in ('GetCapabilities' , 'GetProjectSettings' , 'GetContext' ):
190
+ for request in ('GetCapabilities' , 'GetProjectSettings' ):
191
191
self .wms_request_compare (request )
192
192
193
193
# Test getfeatureinfo response
@@ -237,41 +237,6 @@ def test_project_wms_inspire(self):
237
237
for request in ('GetCapabilities' ,):
238
238
self .wms_inspire_request_compare (request )
239
239
240
- def wms_accesscontrol_request_compare (self , request , extra = None , reference_file = None ):
241
- project = self .projectPath
242
- assert os .path .exists (project ), "Project file not found: " + project
243
-
244
- query_string = 'MAP=%s&SERVICE=WMS&VERSION=1.3&REQUEST=%s' % (urllib .quote (project ), request )
245
- if extra is not None :
246
- query_string += extra
247
- header , body = [str (_v ) for _v in self .server .handleRequest (query_string )]
248
- response = header + body
249
- f = open (self .testdata_path + request .lower () + '_accesscontrol.txt' )
250
- expected = f .read ()
251
- f .close ()
252
- # Store the output for debug or to regenerate the reference documents:
253
- """
254
- f = open(os.path.dirname(__file__) + '/expected.txt', 'w+')
255
- f.write(expected)
256
- f.close()
257
- f = open(os.path.dirname(__file__) + '/response.txt', 'w+')
258
- f.write(response)
259
- f.close()
260
- """
261
- response = re .sub (RE_STRIP_PATH , '' , response )
262
- expected = re .sub (RE_STRIP_PATH , '' , expected )
263
-
264
- # for older GDAL versions (<2.0), id field will be integer type
265
- if int (osgeo .gdal .VersionInfo ()[:1 ]) < 2 :
266
- expected = expected .replace ('typeName="Integer64" precision="0" length="10" editType="TextEdit" type="qlonglong"' , 'typeName="Integer" precision="0" length="10" editType="TextEdit" type="int"' )
267
-
268
- self .assertEqual (response , expected , msg = "request %s failed.\n Query: %s\n Expected:\n %s\n \n Response:\n %s" % (query_string , request , expected , response ))
269
-
270
- def test_project_accesscontrol_wms (self ):
271
- """Test some WMS request"""
272
- for request in ('GetCapabilities' , 'GetProjectSettings' , 'GetContext' ):
273
- self .wms_accesscontrol_request_compare (request )
274
-
275
240
# WFS tests
276
241
def wfs_request_compare (self , request ):
277
242
project = self .testdata_path + "test_project_wfs.qgs"
0 commit comments