Skip to content
Permalink
Browse files

Add unit tests

  • Loading branch information
mhugent committed Dec 31, 2018
1 parent fedb1d8 commit 23669b6891678fb5ecc0772975a4362029f1c3f2
Showing with 26 additions and 0 deletions.
  1. +26 −0 tests/src/python/test_qgsserver_wms_getprint.py
@@ -412,6 +412,32 @@ def test_wms_getprint_two_maps(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetPrint_TwoMaps")

def test_wms_getprint_atlas( self ):
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetPrint",
"TEMPLATE": "layoutA4",
"FORMAT": "png",
"CRS": "EPSG:3857",
"ATLAS_PK": "3",
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Atlas")

def test_wms_getprint_atlas_getProjectSettings( self ):
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.3.0",
"REQUEST": "GetProjectSettings",
}.items())])

r, h = self._result(self._execute_request(qs))
self.assertTrue( 'atlasEnabled="1"' in r )
self.assertTrue( '<PrimaryKeyAttribute>' in r )

if __name__ == '__main__':
unittest.main()

0 comments on commit 23669b6

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