Skip to content

Commit

Permalink
rework server test to use geopackage and qgz
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorbarascu committed Jun 20, 2018
1 parent 2778266 commit 52664b6
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1,693 deletions.
18 changes: 9 additions & 9 deletions tests/src/python/test_qgsserver_wms_getfeatureinfo.py
Expand Up @@ -167,8 +167,8 @@ def testGetFeatureInfo(self):
'wms_getfeatureinfo_notvisible',
'test_project_scalevisibility.qgs')

# Test GetFeatureInfo resolves "value map" widget values
mypath = self.testdata_path + "test_project_values.qgs"
# Test GetFeatureInfo resolves "value map" widget values but also Server usage of qgs and gpkg file
mypath = self.testdata_path + "test_project_values.qgz"
self.wms_request_compare('GetFeatureInfo',
'&layers=layer0&styles=&' +
'VERSION=1.3.0&' +
Expand All @@ -179,11 +179,11 @@ def testGetFeatureInfo(self):
'&FEATURE_COUNT=10' +
'&QUERY_LAYERS=layer0&I=487&J=308',
'wms_getfeatureinfo-values0-text-xml',
'test_project_values.qgs')
'test_project_values.qgz')

def testGetFeatureInfoValueRelation(self):
"""Test GetFeatureInfo resolves "value relation" widget values. regression 18518"""
mypath = self.testdata_path + "test_project_values.qgs"
mypath = self.testdata_path + "test_project_values.qgz"
self.wms_request_compare('GetFeatureInfo',
'&layers=layer1&styles=&' +
'VERSION=1.3.0&' +
Expand All @@ -195,13 +195,13 @@ def testGetFeatureInfoValueRelation(self):
'&WITH_GEOMETRY=True' +
'&QUERY_LAYERS=layer1&I=487&J=308',
'wms_getfeatureinfo-values1-text-xml',
'test_project_values.qgs')
'test_project_values.qgz')

# TODO make GetFeatureInfo show the dictionary values and enable test
@unittest.expectedFailure
def testGetFeatureInfoValueRelationArray(self):
"""Test GetFeatureInfo on "value relation" widget with array field (multiple selections)"""
mypath = self.testdata_path + "test_project_values.qgs"
mypath = self.testdata_path + "test_project_values.qgz"
self.wms_request_compare('GetFeatureInfo',
'&layers=layer3&styles=&' +
'VERSION=1.3.0&' +
Expand All @@ -213,13 +213,13 @@ def testGetFeatureInfoValueRelationArray(self):
'&WITH_GEOMETRY=True' +
'&QUERY_LAYERS=layer3&I=487&J=308',
'wms_getfeatureinfo-values3-text-xml',
'test_project_values.qgs')
'test_project_values.qgz')

# TODO make GetFeatureInfo show what's in the display expression and enable test
@unittest.expectedFailure
def testGetFeatureInfoRelationReference(self):
"""Test GetFeatureInfo solves "relation reference" widget "display expression" values"""
mypath = self.testdata_path + "test_project_values.qgs"
mypath = self.testdata_path + "test_project_values.qgz"
self.wms_request_compare('GetFeatureInfo',
'&layers=layer2&styles=&' +
'VERSION=1.3.0&' +
Expand All @@ -231,7 +231,7 @@ def testGetFeatureInfoRelationReference(self):
'&WITH_GEOMETRY=True' +
'&QUERY_LAYERS=layer2&I=487&J=308',
'wms_getfeatureinfo-values2-text-xml',
'test_project_values.qgs')
'test_project_values.qgz')

def testGetFeatureInfoFilter(self):
# Test getfeatureinfo response xml
Expand Down
Binary file added tests/testdata/qgis_server/db.gpkg
Binary file not shown.

0 comments on commit 52664b6

Please sign in to comment.