Skip to content

Commit e257227

Browse files
committedJun 13, 2014
Fix local test server response parsing and add debug output for url
1 parent c1d80ed commit e257227

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
 

‎tests/src/python/qgis_local_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def get_capabilities(self, params, browser=False):
430430
openInBrowserTab(url)
431431
return False, ''
432432

433-
success = ('perhaps you left off the .qgs extension' in xml or
433+
success = ('error reading the project file' in xml or
434434
'WMS_Capabilities' in xml)
435435
return success, xml
436436

@@ -525,7 +525,7 @@ def get_map(self, params, browser=False):
525525
'No valid PNG output'
526526
)
527527

528-
return success, filepath
528+
return success, filepath, url
529529

530530
def process_params(self, params):
531531
# set all keys to uppercase
@@ -821,7 +821,7 @@ def tearDown(self):
821821
try:
822822
local_srv.check_server_capabilities()
823823
# open resultant png with system
824-
result, png = local_srv.get_map(req_params)
824+
result, png, url = local_srv.get_map(req_params)
825825
finally:
826826
local_srv.shutdown()
827827

‎tests/src/python/test_qgis_local_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_convert_param_instances(self):
116116
# @unittest.skip('')
117117
def test_getmap(self):
118118
test_name = 'qgis_local_server'
119-
success, img_path = MAPSERV.get_map(self.getmap_params())
119+
success, img_path, url = MAPSERV.get_map(self.getmap_params())
120120
msg = '\nLocal server get_map failed'
121121
assert success, msg
122122

‎tests/src/python/test_qgspallabeling_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,10 @@ def checkTest(self, **kwargs):
177177
qDebug('MapSettings type: {0}'.format(settings_type))
178178
qDebug(mapSettingsString(ms))
179179

180-
res_m, self._TestImage = MAPSERV.get_map(
181-
self.get_request_params(), False)
180+
res_m, self._TestImage, url = MAPSERV.get_map(self.get_request_params(), False)
182181
# print self._TestImage.__repr__()
182+
if 'PAL_VERBOSE' in os.environ:
183+
qDebug('GetMap request:\n {0}\n'.format(url))
183184
self.saveControlImage(self._TestImage)
184185
self.assertTrue(res_m, 'Failed to retrieve/save image from test server')
185186
mismatch = 0

0 commit comments

Comments
 (0)
Please sign in to comment.