@@ -451,7 +451,8 @@ def testGetFeatureInfoJSON(self):
451
451
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
452
452
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
453
453
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320' ,
454
- 'wms_getfeatureinfo_json' )
454
+ 'wms_getfeatureinfo_json' ,
455
+ normalizeJson = True )
455
456
456
457
# simple test without geometry and info_format=application/geo+json
457
458
self .wms_request_compare ('GetFeatureInfo' ,
@@ -460,7 +461,8 @@ def testGetFeatureInfoJSON(self):
460
461
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
461
462
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
462
463
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320' ,
463
- 'wms_getfeatureinfo_geojson' )
464
+ 'wms_getfeatureinfo_geojson' ,
465
+ normalizeJson = True )
464
466
465
467
# test with several features and several layers
466
468
self .wms_request_compare ('GetFeatureInfo' ,
@@ -470,7 +472,8 @@ def testGetFeatureInfoJSON(self):
470
472
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
471
473
'query_layers=testlayer%20%C3%A8%C3%A9,fields_alias,exclude_attribute&' +
472
474
'X=190&Y=320&FEATURE_COUNT=2&FI_POINT_TOLERANCE=200' ,
473
- 'wms_getfeatureinfo_multiple_json' )
475
+ 'wms_getfeatureinfo_multiple_json' ,
476
+ normalizeJson = True )
474
477
475
478
# simple test with geometry
476
479
self .wms_request_compare ('GetFeatureInfo' ,
@@ -480,7 +483,8 @@ def testGetFeatureInfoJSON(self):
480
483
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
481
484
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320&' +
482
485
'with_geometry=true' ,
483
- 'wms_getfeatureinfo_geometry_json' )
486
+ 'wms_getfeatureinfo_geometry_json' ,
487
+ normalizeJson = True )
484
488
485
489
# test with alias
486
490
self .wms_request_compare ('GetFeatureInfo' ,
@@ -489,7 +493,8 @@ def testGetFeatureInfoJSON(self):
489
493
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
490
494
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
491
495
'query_layers=fields_alias&X=190&Y=320' ,
492
- 'wms_getfeatureinfo_alias_json' )
496
+ 'wms_getfeatureinfo_alias_json' ,
497
+ normalizeJson = True )
493
498
494
499
# test with excluded attributes
495
500
self .wms_request_compare ('GetFeatureInfo' ,
@@ -498,7 +503,8 @@ def testGetFeatureInfoJSON(self):
498
503
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
499
504
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
500
505
'query_layers=exclude_attribute&X=190&Y=320' ,
501
- 'wms_getfeatureinfo_exclude_attribute_json' )
506
+ 'wms_getfeatureinfo_exclude_attribute_json' ,
507
+ normalizeJson = True )
502
508
503
509
# test with raster layer
504
510
self .wms_request_compare ('GetFeatureInfo' ,
@@ -507,7 +513,8 @@ def testGetFeatureInfoJSON(self):
507
513
'width=500&height=500&srs=EPSG%3A3857&' +
508
514
'bbox=1989139.6,3522745.0,2015014.9,3537004.5&' +
509
515
'query_layers=landsat&X=250&Y=250' ,
510
- 'wms_getfeatureinfo_raster_json' )
516
+ 'wms_getfeatureinfo_raster_json' ,
517
+ normalizeJson = True )
511
518
512
519
def testGetFeatureInfoPostgresTypes (self ):
513
520
# compare json list output with file
@@ -519,7 +526,8 @@ def testGetFeatureInfoPostgresTypes(self):
519
526
'&FILTER=json' +
520
527
urllib .parse .quote (':"pk" = 1' ),
521
528
'get_postgres_types_json_list' ,
522
- 'test_project_postgres_types.qgs' )
529
+ 'test_project_postgres_types.qgs' ,
530
+ normalizeJson = True )
523
531
524
532
# compare dict output with file
525
533
self .wms_request_compare ('GetFeatureInfo' ,
@@ -530,7 +538,8 @@ def testGetFeatureInfoPostgresTypes(self):
530
538
'&FILTER=json' +
531
539
urllib .parse .quote (':"pk" = 2' ),
532
540
'get_postgres_types_json_dict' ,
533
- 'test_project_postgres_types.qgs' )
541
+ 'test_project_postgres_types.qgs' ,
542
+ normalizeJson = True )
534
543
535
544
# compare decoded json field list
536
545
response_header , response_body , query_string = self .wms_request ('GetFeatureInfo' ,
@@ -605,7 +614,8 @@ def testGetFeatureInfoGroupedLayers(self):
605
614
'&I=0&J=1' +
606
615
'&FEATURE_COUNT=10' ,
607
616
'wms_getfeatureinfo_group_name_areas' ,
608
- 'test_project_wms_grouped_layers.qgs' )
617
+ 'test_project_wms_grouped_layers.qgs' ,
618
+ normalizeJson = True )
609
619
610
620
# areas+and+symbols (nested)
611
621
self .wms_request_compare ('GetFeatureInfo' ,
@@ -617,7 +627,8 @@ def testGetFeatureInfoGroupedLayers(self):
617
627
'&I=0&J=1' +
618
628
'&FEATURE_COUNT=10' ,
619
629
'wms_getfeatureinfo_group_name_areas' ,
620
- 'test_project_wms_grouped_nested_layers.qgs' )
630
+ 'test_project_wms_grouped_nested_layers.qgs' ,
631
+ normalizeJson = True )
621
632
622
633
# as-areas-short-name
623
634
self .wms_request_compare ('GetFeatureInfo' ,
@@ -629,7 +640,8 @@ def testGetFeatureInfoGroupedLayers(self):
629
640
'&I=0&J=1' +
630
641
'&FEATURE_COUNT=10' ,
631
642
'wms_getfeatureinfo_group_name_areas' ,
632
- 'test_project_wms_grouped_nested_layers.qgs' )
643
+ 'test_project_wms_grouped_nested_layers.qgs' ,
644
+ normalizeJson = True )
633
645
634
646
# Top level: QGIS Server - Grouped Layer
635
647
self .wms_request_compare ('GetFeatureInfo' ,
@@ -641,7 +653,8 @@ def testGetFeatureInfoGroupedLayers(self):
641
653
'&I=0&J=1' +
642
654
'&FEATURE_COUNT=10' ,
643
655
'wms_getfeatureinfo_group_name_top' ,
644
- 'test_project_wms_grouped_nested_layers.qgs' )
656
+ 'test_project_wms_grouped_nested_layers.qgs' ,
657
+ normalizeJson = True )
645
658
646
659
# Multiple matches from 2 layer groups
647
660
self .wms_request_compare ('GetFeatureInfo' ,
@@ -653,7 +666,8 @@ def testGetFeatureInfoGroupedLayers(self):
653
666
'&I=0&J=1' +
654
667
'&FEATURE_COUNT=10' ,
655
668
'wms_getfeatureinfo_group_name_areas_cities' ,
656
- 'test_project_wms_grouped_nested_layers.qgs' )
669
+ 'test_project_wms_grouped_nested_layers.qgs' ,
670
+ normalizeJson = True )
657
671
658
672
# no_query group (nested)
659
673
self .wms_request_compare ('GetFeatureInfo' ,
@@ -665,7 +679,8 @@ def testGetFeatureInfoGroupedLayers(self):
665
679
'&I=0&J=1' +
666
680
'&FEATURE_COUNT=10' ,
667
681
'wms_getfeatureinfo_group_no_query' ,
668
- 'test_project_wms_grouped_nested_layers.qgs' )
682
+ 'test_project_wms_grouped_nested_layers.qgs' ,
683
+ normalizeJson = True )
669
684
670
685
# query_child group (nested)
671
686
self .wms_request_compare ('GetFeatureInfo' ,
@@ -677,7 +692,8 @@ def testGetFeatureInfoGroupedLayers(self):
677
692
'&I=0&J=1' +
678
693
'&FEATURE_COUNT=10' ,
679
694
'wms_getfeatureinfo_group_query_child' ,
680
- 'test_project_wms_grouped_nested_layers.qgs' )
695
+ 'test_project_wms_grouped_nested_layers.qgs' ,
696
+ normalizeJson = True )
681
697
682
698
# child_ok group (nested)
683
699
self .wms_request_compare ('GetFeatureInfo' ,
@@ -689,7 +705,8 @@ def testGetFeatureInfoGroupedLayers(self):
689
705
'&I=0&J=1' +
690
706
'&FEATURE_COUNT=10' ,
691
707
'wms_getfeatureinfo_group_query_child' ,
692
- 'test_project_wms_grouped_nested_layers.qgs' )
708
+ 'test_project_wms_grouped_nested_layers.qgs' ,
709
+ normalizeJson = True )
693
710
694
711
# as_areas_query_copy == as-areas-short-name-query-copy (nested)
695
712
self .wms_request_compare ('GetFeatureInfo' ,
@@ -701,7 +718,8 @@ def testGetFeatureInfoGroupedLayers(self):
701
718
'&I=0&J=1' +
702
719
'&FEATURE_COUNT=10' ,
703
720
'wms_getfeatureinfo_group_query_child' ,
704
- 'test_project_wms_grouped_nested_layers.qgs' )
721
+ 'test_project_wms_grouped_nested_layers.qgs' ,
722
+ normalizeJson = True )
705
723
706
724
707
725
if __name__ == '__main__' :
0 commit comments