Skip to content

Commit

Permalink
Update control images
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jan 4, 2019
1 parent d499940 commit 3c23928
Show file tree
Hide file tree
Showing 25 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/src/python/test_qgsserver.py
Expand Up @@ -185,6 +185,10 @@ def _img_diff(self, image, control_image, max_diff, max_size_diff=QSize()):
return control.compareImages(control_image, max_diff), control.report() return control.compareImages(control_image, max_diff), control.report()


def _img_diff_error(self, response, headers, image, max_diff=100, max_size_diff=QSize()): def _img_diff_error(self, response, headers, image, max_diff=100, max_size_diff=QSize()):

reference_path = unitTestDataPath('control_images') + '/qgis_server/' + image + '/' + image + '.png'
self.store_reference(reference_path, response)

self.assertEqual( self.assertEqual(
headers.get("Content-Type"), "image/png", headers.get("Content-Type"), "image/png",
"Content type is wrong: %s\n%s" % (headers.get("Content-Type"), response)) "Content type is wrong: %s\n%s" % (headers.get("Content-Type"), response))
Expand Down
4 changes: 4 additions & 0 deletions tests/src/python/test_qgsserver_accesscontrol.py
Expand Up @@ -217,6 +217,10 @@ def _img_diff(self, image, control_image, max_diff, max_size_diff=QSize()):
return control.compareImages(control_image), control.report() return control.compareImages(control_image), control.report()


def _img_diff_error(self, response, headers, image, max_diff=10, max_size_diff=QSize()): def _img_diff_error(self, response, headers, image, max_diff=10, max_size_diff=QSize()):

reference_path = unitTestDataPath('control_images') + '/qgis_server_accesscontrol/' + image + '/' + image + '.png'
self.store_reference(reference_path, response)

self.assertEqual( self.assertEqual(
headers.get("Content-Type"), "image/png", headers.get("Content-Type"), "image/png",
"Content type is wrong: %s" % headers.get("Content-Type")) "Content type is wrong: %s" % headers.get("Content-Type"))
Expand Down
Expand Up @@ -24,6 +24,9 @@


class TestQgsServerAccessControlWMSGetlegendgraphic(TestQgsServerAccessControl): class TestQgsServerAccessControlWMSGetlegendgraphic(TestQgsServerAccessControl):


# Set to True to re-generate reference files for this class
#regenerate_reference = True

def test_wms_getlegendgraphic_hello(self): def test_wms_getlegendgraphic_hello(self):
query_string = "&".join(["%s=%s" % i for i in list({ query_string = "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath), "MAP": urllib.parse.quote(self.projectPath),
Expand Down
3 changes: 3 additions & 0 deletions tests/src/python/test_qgsserver_wms_getlegendgraphic.py
Expand Up @@ -42,6 +42,9 @@
class TestQgsServerWMSGetLegendGraphic(QgsServerTestBase): class TestQgsServerWMSGetLegendGraphic(QgsServerTestBase):
"""QGIS Server WMS Tests for GetLegendGraphic request""" """QGIS Server WMS Tests for GetLegendGraphic request"""


# Set to True to re-generate reference files for this class
#regenerate_reference = True

def test_getLegendGraphics(self): def test_getLegendGraphics(self):
"""Test that does not return an exception but an image""" """Test that does not return an exception but an image"""
parms = { parms = {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/qgis_server_accesscontrol/geo.gpkg
Binary file not shown.

0 comments on commit 3c23928

Please sign in to comment.