Skip to content
Permalink
Browse files

More verbose response

  • Loading branch information
sbrunner committed Jun 9, 2017
1 parent f80a1f5 commit 2346f59f56c983bc72d7fa1982dcd52c6e0d4aca
Showing with 3 additions and 3 deletions.
  1. +1 −1 tests/src/python/test_qgsserver.py
  2. +2 −2 tests/src/python/test_qgsserver_wms.py
@@ -66,7 +66,7 @@ def assertXMLEqual(self, response, expected, msg=''):
response_lines = response.splitlines()
expected_lines = expected.splitlines()
line_no = 1
self.assertEqual(len(expected_lines), len(response_lines), "Expected and response have different number of lines!")
self.assertEqual(len(expected_lines), len(response_lines), "Expected and response have different number of lines!\n{}".format(msg))
for expected_line in expected_lines:
expected_line = expected_line.strip()
response_line = response_lines[line_no - 1].strip()
@@ -62,7 +62,7 @@ def wms_request_compare(self, request, extra=None, reference_file=None):
response = re.sub(RE_STRIP_UNCHECKABLE, b'*****', response)
expected = re.sub(RE_STRIP_UNCHECKABLE, b'*****', expected)

self.assertXMLEqual(response, expected, msg="request %s failed.\n Query: %s\n Expected:\n%s\n\n Response:\n%s" % (query_string, request, expected.decode('utf-8'), response.decode('utf-8')))
self.assertXMLEqual(response, expected, msg="request %s failed.\nQuery: %s\nExpected file: %s\nResponse:\n%s" % (query_string, request, reference_path, response.decode('utf-8')))

def test_project_wms(self):
"""Test some WMS request"""
@@ -151,7 +151,7 @@ def wms_inspire_request_compare(self, request):
f.close()
response = re.sub(RE_STRIP_UNCHECKABLE, b'', response)
expected = re.sub(RE_STRIP_UNCHECKABLE, b'', expected)
self.assertXMLEqual(response, expected, msg="request %s failed.\n Query: %s\n Expected:\n%s\n\n Response:\n%s" % (query_string, request, expected.decode('utf-8'), response.decode('utf-8')))
self.assertXMLEqual(response, expected, msg="request %s failed.\nQuery: %s\nExpected file: %s\nResponse:\n%s" % (query_string, request, reference_path, response.decode('utf-8')))

def test_project_wms_inspire(self):
"""Test some WMS request"""

0 comments on commit 2346f59

Please sign in to comment.
You can’t perform that action at this time.