-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server tests for json types in postgres
- Loading branch information
Showing
4 changed files
with
300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/testdata/qgis_server/get_postgres_types_json_dict.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
***** | ||
Content-Type: text/xml; charset=utf-8 | ||
|
||
<GetFeatureInfoResponse> | ||
<BoundingBox maxy="0" maxx="0" miny="0" CRS="EPSG:3857" minx="0"/> | ||
<Layer name="json"> | ||
<Feature id="2"> | ||
<Attribute value="2" name="pk"/> | ||
<Attribute value="{
 "a": 1,
 "b": 2
}
" name="jvalue"/> | ||
<Attribute value="{
 "c": 4,
 "d": 5
}
" name="jbvalue"/> | ||
</Feature> | ||
</Layer> | ||
</GetFeatureInfoResponse> |
13 changes: 13 additions & 0 deletions
13
tests/testdata/qgis_server/get_postgres_types_json_list.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
***** | ||
Content-Type: text/xml; charset=utf-8 | ||
|
||
<GetFeatureInfoResponse> | ||
<BoundingBox maxy="0" maxx="0" miny="0" CRS="EPSG:3857" minx="0"/> | ||
<Layer name="json"> | ||
<Feature id="1"> | ||
<Attribute value="1" name="pk"/> | ||
<Attribute value="[
 1,
 2,
 3
]
" name="jvalue"/> | ||
<Attribute value="[
 4,
 5,
 6
]
" name="jbvalue"/> | ||
</Feature> | ||
</Layer> | ||
</GetFeatureInfoResponse> |
254 changes: 254 additions & 0 deletions
254
tests/testdata/qgis_server/test_project_postgres_types.qgs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | ||
<qgis projectname="" version="3.3.0-Master"> | ||
<homePath path=""/> | ||
<title></title> | ||
<autotransaction active="0"/> | ||
<evaluateDefaultValues active="0"/> | ||
<trust active="0"/> | ||
<projectCrs> | ||
<spatialrefsys> | ||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> | ||
<srsid>3452</srsid> | ||
<srid>4326</srid> | ||
<authid>EPSG:4326</authid> | ||
<description>WGS 84</description> | ||
<projectionacronym>longlat</projectionacronym> | ||
<ellipsoidacronym>WGS84</ellipsoidacronym> | ||
<geographicflag>true</geographicflag> | ||
</spatialrefsys> | ||
</projectCrs> | ||
<layer-tree-group> | ||
<customproperties/> | ||
<layer-tree-layer expanded="1" checked="Qt::Checked" source="dbname='qgis_test' port=5432 user='postgres' sslmode=disable key='pk' table="qgis_test"."json" sql=" providerKey="postgres" id="json_b2af056d_ba24_4fb7_805b_5a7720e242f3" name="json"> | ||
<customproperties/> | ||
</layer-tree-layer> | ||
<custom-order enabled="0"/> | ||
</layer-tree-group> | ||
<snapping-settings enabled="0" type="1" intersection-snapping="0" unit="2" tolerance="0" mode="2"> | ||
<individual-layer-settings/> | ||
</snapping-settings> | ||
<relations/> | ||
<mapcanvas annotationsVisible="1" name="theMapCanvas"> | ||
<units>degrees</units> | ||
<extent> | ||
<xmin>8.20313020806923632</xmin> | ||
<ymin>44.90118727027074641</ymin> | ||
<xmax>8.20717330488028196</xmax> | ||
<ymax>44.90224039332306205</ymax> | ||
</extent> | ||
<rotation>0</rotation> | ||
<destinationsrs> | ||
<spatialrefsys> | ||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> | ||
<srsid>3452</srsid> | ||
<srid>4326</srid> | ||
<authid>EPSG:4326</authid> | ||
<description>WGS 84</description> | ||
<projectionacronym>longlat</projectionacronym> | ||
<ellipsoidacronym>WGS84</ellipsoidacronym> | ||
<geographicflag>true</geographicflag> | ||
</spatialrefsys> | ||
</destinationsrs> | ||
<rendermaptile>0</rendermaptile> | ||
</mapcanvas> | ||
<projectModels/> | ||
<legend updateDrawingOrder="true"> | ||
<legendlayer showFeatureCount="0" drawingOrder="-1" open="true" checked="Qt::Checked" name="json"> | ||
<filegroup open="true" hidden="false"> | ||
<legendlayerfile visible="1" layerid="json_b2af056d_ba24_4fb7_805b_5a7720e242f3" isInOverview="0"/> | ||
</filegroup> | ||
</legendlayer> | ||
</legend> | ||
<mapViewDocks/> | ||
<projectlayers> | ||
<maplayer maxScale="0" autoRefreshEnabled="0" hasScaleBasedVisibilityFlag="0" type="vector" refreshOnNotifyMessage="" autoRefreshTime="0" geometry="No geometry" styleCategories="AllStyleCategories" refreshOnNotifyEnabled="0" minScale="1e+8" readOnly="0"> | ||
<id>json_b2af056d_ba24_4fb7_805b_5a7720e242f3</id> | ||
<datasource>dbname='qgis_test' port=5432 user='postgres' password='postgres' sslmode=disable key='pk' table="qgis_test"."json" sql=</datasource> | ||
<keywordList> | ||
<value></value> | ||
</keywordList> | ||
<layername>json</layername> | ||
<srs> | ||
<spatialrefsys> | ||
<proj4></proj4> | ||
<srsid>0</srsid> | ||
<srid>0</srid> | ||
<authid></authid> | ||
<description></description> | ||
<projectionacronym></projectionacronym> | ||
<ellipsoidacronym></ellipsoidacronym> | ||
<geographicflag>true</geographicflag> | ||
</spatialrefsys> | ||
</srs> | ||
<resourceMetadata> | ||
<identifier></identifier> | ||
<parentidentifier></parentidentifier> | ||
<language></language> | ||
<type>dataset</type> | ||
<title></title> | ||
<abstract></abstract> | ||
<links/> | ||
<fees></fees> | ||
<encoding></encoding> | ||
<crs> | ||
<spatialrefsys> | ||
<proj4></proj4> | ||
<srsid>0</srsid> | ||
<srid>0</srid> | ||
<authid></authid> | ||
<description></description> | ||
<projectionacronym></projectionacronym> | ||
<ellipsoidacronym></ellipsoidacronym> | ||
<geographicflag>false</geographicflag> | ||
</spatialrefsys> | ||
</crs> | ||
<extent/> | ||
</resourceMetadata> | ||
<provider encoding="ISO-8859-5">postgres</provider> | ||
<vectorjoins/> | ||
<layerDependencies/> | ||
<dataDependencies/> | ||
<legend type="default-vector"/> | ||
<expressionfields/> | ||
<map-layer-style-manager current="default"> | ||
<map-layer-style name="default"/> | ||
</map-layer-style-manager> | ||
<auxiliaryLayer/> | ||
<flags> | ||
<Identifiable>1</Identifiable> | ||
<Removable>1</Removable> | ||
<Searchable>1</Searchable> | ||
</flags> | ||
<customproperties> | ||
<property key="dualview/previewExpressions" value=""pk""/> | ||
</customproperties> | ||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0"/> | ||
<fieldConfiguration> | ||
<field name="pk"> | ||
<editWidget type=""> | ||
<config> | ||
<Option/> | ||
</config> | ||
</editWidget> | ||
</field> | ||
<field name="jvalue"> | ||
<editWidget type=""> | ||
<config> | ||
<Option/> | ||
</config> | ||
</editWidget> | ||
</field> | ||
<field name="jbvalue"> | ||
<editWidget type=""> | ||
<config> | ||
<Option/> | ||
</config> | ||
</editWidget> | ||
</field> | ||
</fieldConfiguration> | ||
<aliases> | ||
<alias field="pk" index="0" name=""/> | ||
<alias field="jvalue" index="1" name=""/> | ||
<alias field="jbvalue" index="2" name=""/> | ||
</aliases> | ||
<excludeAttributesWMS/> | ||
<excludeAttributesWFS/> | ||
<defaults> | ||
<default field="pk" applyOnUpdate="0" expression=""/> | ||
<default field="jvalue" applyOnUpdate="0" expression=""/> | ||
<default field="jbvalue" applyOnUpdate="0" expression=""/> | ||
</defaults> | ||
<constraints> | ||
<constraint constraints="3" field="pk" notnull_strength="1" exp_strength="0" unique_strength="1"/> | ||
<constraint constraints="0" field="jvalue" notnull_strength="0" exp_strength="0" unique_strength="0"/> | ||
<constraint constraints="0" field="jbvalue" notnull_strength="0" exp_strength="0" unique_strength="0"/> | ||
</constraints> | ||
<constraintExpressions> | ||
<constraint field="pk" exp="" desc=""/> | ||
<constraint field="jvalue" exp="" desc=""/> | ||
<constraint field="jbvalue" exp="" desc=""/> | ||
</constraintExpressions> | ||
<expressionfields/> | ||
<attributeactions> | ||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/> | ||
</attributeactions> | ||
<attributetableconfig actionWidgetStyle="dropDown" sortOrder="0" sortExpression=""> | ||
<columns/> | ||
</attributetableconfig> | ||
<conditionalstyles> | ||
<rowstyles/> | ||
<fieldstyles/> | ||
</conditionalstyles> | ||
<editform tolerant="1"></editform> | ||
<editforminit/> | ||
<editforminitcodesource>0</editforminitcodesource> | ||
<editforminitfilepath></editforminitfilepath> | ||
<editforminitcode><![CDATA[]]></editforminitcode> | ||
<featformsuppress>0</featformsuppress> | ||
<editorlayout>generatedlayout</editorlayout> | ||
<editable/> | ||
<labelOnTop/> | ||
<widgets/> | ||
<previewExpression>"pk"</previewExpression> | ||
<mapTip></mapTip> | ||
</maplayer> | ||
</projectlayers> | ||
<layerorder/> | ||
<properties> | ||
<Measure> | ||
<Ellipsoid type="QString">WGS84</Ellipsoid> | ||
</Measure> | ||
<SpatialRefSys> | ||
<ProjectionsEnabled type="int">1</ProjectionsEnabled> | ||
</SpatialRefSys> | ||
<Gui> | ||
<CanvasColorBluePart type="int">255</CanvasColorBluePart> | ||
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart> | ||
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart> | ||
<SelectionColorBluePart type="int">0</SelectionColorBluePart> | ||
<CanvasColorRedPart type="int">255</CanvasColorRedPart> | ||
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart> | ||
<SelectionColorRedPart type="int">255</SelectionColorRedPart> | ||
</Gui> | ||
<PositionPrecision> | ||
<DecimalPlaces type="int">2</DecimalPlaces> | ||
<Automatic type="bool">true</Automatic> | ||
</PositionPrecision> | ||
<Legend> | ||
<filterByMap type="bool">false</filterByMap> | ||
</Legend> | ||
<PAL> | ||
<CandidatesPoint type="int">16</CandidatesPoint> | ||
<CandidatesLine type="int">50</CandidatesLine> | ||
<ShowingAllLabels type="bool">false</ShowingAllLabels> | ||
<SearchMethod type="int">0</SearchMethod> | ||
<DrawRectOnly type="bool">false</DrawRectOnly> | ||
<CandidatesPolygon type="int">30</CandidatesPolygon> | ||
<ShowingCandidates type="bool">false</ShowingCandidates> | ||
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels> | ||
<DrawOutlineLabels type="bool">true</DrawOutlineLabels> | ||
</PAL> | ||
<Paths> | ||
<Absolute type="bool">false</Absolute> | ||
</Paths> | ||
<Measurement> | ||
<DistanceUnits type="QString">meters</DistanceUnits> | ||
<AreaUnits type="QString">m2</AreaUnits> | ||
</Measurement> | ||
</properties> | ||
<visibility-presets/> | ||
<transformContext/> | ||
<projectMetadata> | ||
<identifier></identifier> | ||
<parentidentifier></parentidentifier> | ||
<language></language> | ||
<type></type> | ||
<title></title> | ||
<abstract></abstract> | ||
<links/> | ||
<author>David</author> | ||
<creation>2018-10-17T15:28:25</creation> | ||
</projectMetadata> | ||
<Annotations/> | ||
<Layouts/> | ||
</qgis> |