mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Tests for bugfix #49900
This commit is contained in:
parent
cc97a38bcb
commit
58e16e7842
@ -31,7 +31,7 @@ from qgis.core import QgsProject
|
||||
class TestQgsServerWMSGetPrintAtlas(QgsServerTestBase):
|
||||
"""QGIS Server WMS Tests for GetPrint atlas request"""
|
||||
|
||||
def test_wms_getprint_atlas(self):
|
||||
def __test_wms_getprint_atlas(self):
|
||||
qs = "?" + "&".join(["%s=%s" % i for i in list({
|
||||
"MAP": urllib.parse.quote(self.projectPath),
|
||||
"SERVICE": "WMS",
|
||||
@ -46,7 +46,7 @@ class TestQgsServerWMSGetPrintAtlas(QgsServerTestBase):
|
||||
r, h = self._result(self._execute_request(qs))
|
||||
self._img_diff_error(r, h, "WMS_GetPrint_Atlas")
|
||||
|
||||
def test_wms_getprint_atlas_getProjectSettings(self):
|
||||
def __test_wms_getprint_atlas_getProjectSettings(self):
|
||||
qs = "?" + "&".join(["%s=%s" % i for i in list({
|
||||
"MAP": urllib.parse.quote(self.projectPath),
|
||||
"SERVICE": "WMS",
|
||||
@ -62,7 +62,7 @@ class TestQgsServerWMSGetPrintAtlas(QgsServerTestBase):
|
||||
|
||||
project = QgsProject()
|
||||
self.assertTrue(project.read(os.path.join(unitTestDataPath(), 'qgis_server', 'bug_gh30817_atlas_pk.qgs')))
|
||||
qs = "?" + "&".join(["%s=%s" % i for i in list({
|
||||
params = {
|
||||
"SERVICE": "WMS",
|
||||
"VERSION": "1.3.0",
|
||||
"REQUEST": "GetPrint",
|
||||
@ -72,10 +72,18 @@ class TestQgsServerWMSGetPrintAtlas(QgsServerTestBase):
|
||||
"DPI": "50",
|
||||
"CRS": "EPSG:2056",
|
||||
"ATLAS_PK": "2",
|
||||
}.items())])
|
||||
}
|
||||
qs = "?" + "&".join(["%s=%s" % i for i in list(params.items())])
|
||||
r, h = self._result(self._execute_request_project(qs, project))
|
||||
self._img_diff_error(r, h, "WMS_GetPrint_Atlas_No_Pk")
|
||||
|
||||
# Test issue GH #49900: when using map scales scale
|
||||
params['TEMPLATE'] = 'layout_fixed_scale'
|
||||
params['ATLAS_PK'] = '4'
|
||||
qs = "?" + "&".join(["%s=%s" % i for i in list(params.items())])
|
||||
r, h = self._result(self._execute_request_project(qs, project))
|
||||
self._img_diff_error(r, h, "WMS_GetPrint_Atlas_Fixed_Scale")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
1442
tests/testdata/qgis_server/bug_gh30817_atlas_pk.qgs
vendored
1442
tests/testdata/qgis_server/bug_gh30817_atlas_pk.qgs
vendored
File diff suppressed because it is too large
Load Diff
@ -2,3 +2,4 @@ WKT,
|
||||
"POLYGON ((4.8452965180606 46.1362035978033,4.94146270849539 45.8947544654919,5.21516648127133 45.9153443716443,5.16338468642183 46.1413293603677,4.8452965180606 46.1362035978033))"
|
||||
"POLYGON ((4.35706816662244 45.7916903788217,4.40145256220773 45.4865387880861,4.06856959531807 45.5280126703756,3.97240340488328 45.786532162445,4.35706816662244 45.7916903788217))"
|
||||
"POLYGON ((5.08201329451547 45.4138859638244,5.01543670113754 45.2787109954903,5.43708845919777 45.1588640613962,5.44448585846198 45.3827203902239,5.08201329451547 45.4138859638244))"
|
||||
"POLYGON ((4.69826111430302 45.8666064555291,4.53503142343834 45.2823375503067,4.99716563895345 45.1075596050359,4.94945429451764 45.7859095265158,4.69826111430302 45.8666064555291))"
|
||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
Loading…
x
Reference in New Issue
Block a user