We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6600f0c commit 22a2771Copy full SHA for 22a2771
1 file changed
tests/unit/unmarshalling/test_unmarshal.py
@@ -352,6 +352,27 @@ def test_array_valid(self, unmarshaller_factory):
352
353
assert result == value
354
355
+ def test_array_null(self, unmarshaller_factory):
356
+ schema = Schema(
357
+ 'array',
358
+ items=Schema('integer'),
359
+ )
360
+ value = None
361
+
362
+ with pytest.raises(TypeError):
363
+ unmarshaller_factory(schema)(value)
364
365
+ def test_array_nullable(self, unmarshaller_factory):
366
367
368
369
+ nullable=True,
370
371
372
+ result = unmarshaller_factory(schema)(value)
373
374
+ assert result is None
375
376
def test_array_of_string_string_invalid(self, unmarshaller_factory):
377
schema = Schema('array', items=Schema('string'))
378
value = '123'
0 commit comments