def METHOD_NAME(capsys):
    """Generate XML from an event object with a small number of fields,
    and see if it matches what we expect."""
    event = Event(
        data="This is a test of the emergency broadcast system.",
        stanza="fubar",
        time="%.3f" % 1372187084.000
    )
    event.write_to(sys.stdout)
    captured = capsys.readouterr()
    constructed = ET.fromstring(captured.out)
    with data_open("data/event_minimal.xml") as data:
        expected = ET.parse(data).getroot()
        assert xml_compare(expected, constructed)