Skip to content
Permalink
Browse files

Test 8bit

  • Loading branch information
m-kuhn authored and nyalldawson committed Jun 8, 2020
1 parent a4b26f2 commit 9e23fb98a092ed8ecbf022fee59500476aa94000
Showing with 5 additions and 5 deletions.
  1. +5 −5 tests/src/python/test_qgsserver_wms_getmap.py
@@ -241,8 +241,8 @@ def test_wms_getmap_dpi(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_Basic5")
img = QImage.fromData(r, "PNG")
self.assertEqual(img.dotsPerMeterX(), 4409)
self.assertEqual(img.dotsPerMeterY(), 4409)
self.assertEqual(round(img.dotsPerMeterX() / 39.37, 1), 112.5)
self.assertEqual(round(img.dotsPerMeterY() / 39.37, 1), 112.5)

def test_wms_getmap_dpi_png_8bit(self):
qs = "?" + "&".join(["%s=%s" % i for i in list({
@@ -252,7 +252,7 @@ def test_wms_getmap_dpi_png_8bit(self):
"REQUEST": "GetMap",
"LAYERS": "Country",
"STYLES": "",
"FORMAT": "image/png",
"FORMAT": "image/png; mode=8bit",
"BBOX": "-16817707,-4710778,5696513,14587125",
"HEIGHT": "500",
"WIDTH": "500",
@@ -262,8 +262,8 @@ def test_wms_getmap_dpi_png_8bit(self):

r, h = self._result(self._execute_request(qs))
img = QImage.fromData(r, "PNG")
self.assertEqual(img.dotsPerMeterX(), 4409)
self.assertEqual(img.dotsPerMeterY(), 4409)
self.assertEqual(round(img.dotsPerMeterX() / 39.37, 1), 112.5)
self.assertEqual(round(img.dotsPerMeterY() / 39.37, 1), 112.5)

def test_wms_getmap_invalid_parameters(self):
# invalid format

0 comments on commit 9e23fb9

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