def METHOD_NAME(petstore_dict):
    petstore_spec = Spec.from_dict(petstore_dict)
    pet_spec = petstore_spec.spec_dict['definitions']['Pet']
    value = 'i am not a dict'
    with pytest.raises(SwaggerMappingError) as excinfo:
        marshal_model(petstore_spec, pet_spec, value)
    assert "Expected type to be dict or Model to marshal value '{}' to a dict. Was {} instead.".format(
        value, type(value),
    ) in str(excinfo.value)