def test_dynamodb_field_to_native_should_rasie_invalid_json(): field = MapType() with pytest.raises(ConversionError): assert field.to_native('{"field": None}')
def test_dynamodb_field_to_native_should_parse_valid_json(): field = MapType() assert field.to_native('{"field": "value"}') == {'field': 'value'}