@@ -273,7 +273,7 @@ def test_check_parameters_wrong_key(self):
273
273
self .assertListEqual (
274
274
raised .exception .detail ,
275
275
[ErrorDetail (string = "The convert action accepts only these parameters: "
276
- "dataset_id, format, bounding_box, skip_check" ,
276
+ "dataset_id, format, bounding_box, skip_check, converter_options " ,
277
277
code = 'invalid' )])
278
278
279
279
def test_check_parameters_wrong_format (self ):
@@ -292,7 +292,7 @@ def test_check_parameters_extra_param(self):
292
292
self .assertListEqual (
293
293
raised .exception .detail ,
294
294
[ErrorDetail (string = "The convert action accepts only these parameters: "
295
- "dataset_id, format, bounding_box, skip_check" ,
295
+ "dataset_id, format, bounding_box, skip_check, converter_options " ,
296
296
code = 'invalid' )])
297
297
298
298
def test_check_parameters_wrong_type_for_dataset_id (self ):
@@ -318,6 +318,14 @@ def test_check_parameters_wrong_bounding_box_type(self):
318
318
models .ConvertJob .check_parameters (
319
319
{'dataset_id' : 1 , 'format' : 'idf' , 'bounding_box' : [2 ]})
320
320
321
+ def test_check_parameters_wrong_converter_options_type (self ):
322
+ """`check_parameters()` must raise an exception if the
323
+ 'converter_options' value is of the wrong type
324
+ """
325
+ with self .assertRaises (ValidationError ):
326
+ models .ConvertJob .check_parameters (
327
+ {'dataset_id' : 1 , 'format' : 'idf' , 'converter_options' : '2' })
328
+
321
329
def test_get_signature_syntool (self ):
322
330
"""Test the right signature is returned"""
323
331
self .maxDiff = None
@@ -326,7 +334,7 @@ def test_get_signature_syntool(self):
326
334
tasks_core .unarchive .signature (),
327
335
tasks_core .crop .signature (
328
336
kwargs = {'bounding_box' : [0 , 20 , 20 , 0 ]}),
329
- tasks_syntool .convert .signature (),
337
+ tasks_syntool .convert .signature (kwargs = { 'converter_options' : None } ),
330
338
tasks_syntool .db_insert .signature (),
331
339
tasks_core .remove_downloaded .signature ())
332
340
0 commit comments