def METHOD_NAME(monkeypatch):
    """Test that a bad log level is coerced to ERROR."""
    monkeypatch.setenv("FLOWMACHINE_LOG_LEVEL", "BAD_LEVEL")
    connect()
    assert logging.ERROR == logging.getLogger("flowmachine.debug").level