def test_deserialize_incorrect_type(self): field = ResourceMeta() value = True with pytest.raises(ValidationError) as excinfo: field.deserialize(value) assert excinfo.value.args[0] == 'Not a valid mapping type.'
def test_deserialize(self): field = ResourceMeta() value = {'active': True} result = field.deserialize(value) assert result == value