def METHOD_NAME(mocker: MockerFixture,
                                 monkeypatch,
                                 mock_requests_session):
    """
    Test that when the bot fails, a message is sent to rocket-chat, and our exit code is 1.
    """
    def mock_get_hourly_readings(self, filename: str):
        raise Exception()
    monkeypatch.setattr(wfwx_api, 'get_hourly_readings', mock_get_hourly_readings)
    rocket_chat_spy = mocker.spy(hourly_actuals, 'send_rocketchat_notification')
    with pytest.raises(SystemExit) as excinfo:
        hourly_actuals.main()
    # Assert that we exited with an error code.
    assert excinfo.value.code == os.EX_SOFTWARE
    # Assert that rocket chat was called.
    assert rocket_chat_spy.call_count == 1