Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add tests
  • Loading branch information
pblottiere committed Nov 5, 2019
1 parent 15fb672 commit bf9cc22
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/src/python/test_qgsserver_wms_getfeatureinfo.py
Expand Up @@ -473,7 +473,7 @@ def testGetFeatureInfoJSON(self):
'wms_getfeatureinfo_multiple_json',
normalizeJson=True)

# simple test with geometry
# simple test with geometry with underlying layer in 3857
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=application%2Fjson&transparent=true&' +
Expand All @@ -482,6 +482,19 @@ def testGetFeatureInfoJSON(self):
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320&' +
'with_geometry=true',
'wms_getfeatureinfo_geometry_json',
'test_project_epsg3857.qgs',
normalizeJson=True)

# simple test with geometry with underlying layer in 4326
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=application%2Fjson&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320&' +
'with_geometry=true',
'wms_getfeatureinfo_geometry_json',
'test_project.qgs',
normalizeJson=True)

# test with alias
Expand Down
1 change: 1 addition & 0 deletions tests/testdata/qgis_server/testlayer_3857.cpg
@@ -0,0 +1 @@
UTF-8
Binary file added tests/testdata/qgis_server/testlayer_3857.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions tests/testdata/qgis_server/testlayer_3857.prj
@@ -0,0 +1 @@
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
1 change: 1 addition & 0 deletions tests/testdata/qgis_server/testlayer_3857.qpj
@@ -0,0 +1 @@
PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]
Binary file added tests/testdata/qgis_server/testlayer_3857.shp
Binary file not shown.
Binary file added tests/testdata/qgis_server/testlayer_3857.shx
Binary file not shown.

0 comments on commit bf9cc22

Please sign in to comment.