def METHOD_NAME(polymorphic_spec):
    pet_list_dicts = [
        {
            'name': 'a dog name',
            'type': 'a-random-value',
            'birth_date': '2017-03-09',
        },
    ]
    with pytest.raises(ValidationError):
        # Expecting validation error as "a-random-value" is not a valid type
        unmarshal_response(
            response=Mock(
                spec=IncomingResponse,
                status_code=200,
                headers={'content-type': APP_JSON},
                json=Mock(return_value=pet_list_dicts),
            ),
            op=polymorphic_spec.resources['pets'].operations['get_pets'],
        )