@@ -176,6 +176,61 @@ def test_project_wms_inspire(self):
176
176
for request in ('GetCapabilities' ,):
177
177
self .wms_inspire_request_compare (request )
178
178
179
+ def test_wms_getmap_basic_mode (self ):
180
+ # 1 bits
181
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
182
+ "MAP" : urllib .parse .quote (self .projectPath ),
183
+ "SERVICE" : "WMS" ,
184
+ "VERSION" : "1.1.1" ,
185
+ "REQUEST" : "GetMap" ,
186
+ "LAYERS" : "Country" ,
187
+ "STYLES" : "" ,
188
+ "FORMAT" : "image/png; mode=1bit" ,
189
+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
190
+ "HEIGHT" : "500" ,
191
+ "WIDTH" : "500" ,
192
+ "CRS" : "EPSG:3857"
193
+ }.items ())])
194
+
195
+ r , h = self ._result (self ._execute_request (qs ))
196
+ self ._img_diff_error (r , h , "WMS_GetMap_Mode_1bit" , 20000 )
197
+
198
+ # 8 bits
199
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
200
+ "MAP" : urllib .parse .quote (self .projectPath ),
201
+ "SERVICE" : "WMS" ,
202
+ "VERSION" : "1.1.1" ,
203
+ "REQUEST" : "GetMap" ,
204
+ "LAYERS" : "Country" ,
205
+ "STYLES" : "" ,
206
+ "FORMAT" : "image/png; mode=8bit" ,
207
+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
208
+ "HEIGHT" : "500" ,
209
+ "WIDTH" : "500" ,
210
+ "CRS" : "EPSG:3857"
211
+ }.items ())])
212
+
213
+ r , h = self ._result (self ._execute_request (qs ))
214
+ self ._img_diff_error (r , h , "WMS_GetMap_Mode_8bit" , 20000 )
215
+
216
+ # 16 bits
217
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
218
+ "MAP" : urllib .parse .quote (self .projectPath ),
219
+ "SERVICE" : "WMS" ,
220
+ "VERSION" : "1.1.1" ,
221
+ "REQUEST" : "GetMap" ,
222
+ "LAYERS" : "Country" ,
223
+ "STYLES" : "" ,
224
+ "FORMAT" : "image/png; mode=16bit" ,
225
+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
226
+ "HEIGHT" : "500" ,
227
+ "WIDTH" : "500" ,
228
+ "CRS" : "EPSG:3857"
229
+ }.items ())])
230
+
231
+ r , h = self ._result (self ._execute_request (qs ))
232
+ self ._img_diff_error (r , h , "WMS_GetMap_Mode_16bit" , 20000 )
233
+
179
234
def test_wms_getmap_basic (self ):
180
235
qs = "?" + "&" .join (["%s=%s" % i for i in list ({
181
236
"MAP" : urllib .parse .quote (self .projectPath ),
0 commit comments