Skip to content

Commit 4320a2d

Browse files
committed
Add test for REQUIREAUTH
1 parent 1b23c1e commit 4320a2d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ogc_tests.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,18 @@ def test_wms_badrequest(self):
314314
ogc_response = self.ogc_get('wms_test', params)
315315
self.assertTrue('Request GETNONEXISTING is not supported' in ogc_response.text)
316316

317+
def test_wms_requireauth(self):
318+
params = {
319+
'SERVICE': 'WMS',
320+
'VERSION': '1.3.0',
321+
'REQUEST': 'GetProjectSettings',
322+
'REQUIREAUTH': '1'
323+
}
324+
with test_config(self.WMS_RESOURCES, self.WMS_PERMISSIONS):
325+
ogc_response = self.ogc_get('wms_test', params)
326+
self.assertTrue('Unauthorized' in ogc_response.text)
327+
self.assertEqual(401, ogc_response.status_code)
328+
317329
def test_wms_capabilities(self):
318330
params = {
319331
'SERVICE': 'WMS',

0 commit comments

Comments
 (0)