def METHOD_NAME():
    """Make sure that an AttributeError is raised if an invalid field is
    requested
    """
    with temp_data_model(
        make_proto_def(
            {
                "ThingOne": {
                    "foo": str,
                    "bar": int,
                }
            }
        )
    ) as dm:
        data_dict = {
            "foo": "foo-val",
            "bar": 1234,
        }
        backend = DictBackend(data_dict)
        msg = dm.ThingOne.from_backend(backend)
        with pytest.raises(AttributeError):
            backend.get_attribute(dm.ThingOne, "baz")
        with pytest.raises(AttributeError):
            msg.baz