@@ -283,6 +283,9 @@ def test_filling_default_value_in_diagnostic_record(self):
283
283
self ._assert_is_test_error (error , error_data )
284
284
285
285
def test_keeps_rubbish_in_diagnostic_record (self ):
286
+ use_spacial = self .driver_supports_features (
287
+ types .Feature .API_TYPE_SPATIAL
288
+ )
286
289
for as_cause in (False , True ):
287
290
with self .subTest (as_cause = as_cause ):
288
291
diagnostic_record = {
@@ -292,16 +295,26 @@ def test_keeps_rubbish_in_diagnostic_record(self):
292
295
"CURRENT_SCHEMA" : {"uh" : "oh!" },
293
296
"OPERATION_CODE" : False ,
294
297
"_classification" : 42 ,
295
- # stub script will interpret this as JOLT bytes
296
- "_status_parameters" : {"Hello" : "Goodbye" },
298
+ "_status_parameters" : [
299
+ # stub script will interpret this as JOLT spatial point
300
+ {"@" : "SRID=4326;POINT(56.21 13.43)" }
301
+ if use_spacial
302
+ else "whatever" ,
303
+ ],
297
304
}
298
305
error_data = self ._make_test_error_data (
299
306
diagnostic_record = diagnostic_record ,
300
307
code = None if as_cause else ...,
301
308
)
302
309
if as_cause :
303
310
error_data = self ._make_test_error_data (cause = error_data )
311
+
304
312
error = self .get_error (error_data )
313
+
314
+ if use_spacial :
315
+ diagnostic_record ["_status_parameters" ] = [
316
+ types .CypherPoint ("wgs84" , 56.21 , 13.43 )
317
+ ]
305
318
self ._assert_is_test_error (error , error_data )
306
319
307
320
def test_error_retryable (self ):
0 commit comments