def METHOD_NAME(capsys):
    """Check that the log method on EventWriter produces the
    expected error message."""
    ew = EventWriter(sys.stdout, sys.stderr)
    ew.log(EventWriter.ERROR, "Something happened!")
    captured = capsys.readouterr()
    assert captured.err == "ERROR Something happened!\n"