def test_request_retry_skip(caplog): client = Client(VERIFY_WEBUI_CERTIFICATE=False) _ = client.app.version # do the login first with caplog.at_level(logging.DEBUG, logger="qbittorrentapi"): with pytest.raises(exceptions.MissingRequiredParameters400Error): client.torrents_rename() assert "Retry attempt" not in caplog.text
def test_verbose_logging(caplog): client = Client(VERBOSE_RESPONSE_LOGGING=True, VERIFY_WEBUI_CERTIFICATE=False) with caplog.at_level(logging.DEBUG, logger="qbittorrentapi"): with pytest.raises(exceptions.NotFound404Error): client.torrents_rename(hash="asdf", new_torrent_name="erty") assert "Response status" in caplog.text
def test_verbose_logging(caplog): client = Client(VERBOSE_RESPONSE_LOGGING=True) with caplog.at_level(logging.DEBUG, logger='qbittorrentapi'): with pytest.raises(NotFound404Error): client.torrents_rename(hash='asdf', new_torrent_name='erty') assert 'Response status' in caplog.text