Skip to content
Permalink
Browse files

Fix unit test

  • Loading branch information
pblottiere committed Jan 28, 2019
1 parent 1b6ed5f commit 70189194a92ba41bbe7e1cf4e6c8f49a27da4664
@@ -398,6 +398,7 @@ QgsServerParameters::QgsServerParameters()
QgsServerParameters::QgsServerParameters( const QUrlQuery &query )
: QgsServerParameters()
{
mUrlQuery = query;
load( query );
}

@@ -415,14 +416,7 @@ void QgsServerParameters::add( const QString &key, const QString &value )

QUrlQuery QgsServerParameters::urlQuery() const
{
QUrlQuery query;

for ( auto param : toMap().toStdMap() )
{
query.addQueryItem( param.first, param.second );
}

return query;
return mUrlQuery;
}

void QgsServerParameters::remove( QgsServerParameter::Name name )
@@ -338,6 +338,7 @@ class SERVER_EXPORT QgsServerParameters
QVariant value( QgsServerParameter::Name name ) const;

QMap<QgsServerParameter::Name, QgsServerParameter> mParameters;
QUrlQuery mUrlQuery;
};

#endif
@@ -449,7 +449,7 @@ def testGetFeatureInfoJSON(self):
'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',
'wms_getfeatureinfo_json')
'wms_getfeatureinfo_geojson')

# test with several features and several layers
self.wms_request_compare('GetFeatureInfo',
@@ -0,0 +1,19 @@
*****
Content-Type: application/geo+json; charset=utf-8

{
"layers":[{
"name": "testlayer èé",
"type": "FeatureCollection",
"features":[
{
"type":"Feature",
"id":2,
"geometry":null,
"properties":{
"id":3,
"name":"three",
"utf8nameè":"three èé↓"
}
}
]}]}

0 comments on commit 7018919

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