diff --git a/src/tribler/core/components/libtorrent/download_manager/download.py b/src/tribler/core/components/libtorrent/download_manager/download.py index 2224bb66c1b..50030abf081 100644 --- a/src/tribler/core/components/libtorrent/download_manager/download.py +++ b/src/tribler/core/components/libtorrent/download_manager/download.py @@ -269,7 +269,7 @@ def on_save_resume_data_alert(self, alert): Callback for the alert that contains the resume data of a specific download. This resume data will be written to a file on disk. """ - self._logger.debug(f'On save resume data alert: %s', alert) + self._logger.debug('On save resume data alert: %s', alert) if self.checkpoint_disabled: return diff --git a/src/tribler/core/components/libtorrent/tests/test_download.py b/src/tribler/core/components/libtorrent/tests/test_download.py index 6f3971091c7..337972129f7 100644 --- a/src/tribler/core/components/libtorrent/tests/test_download.py +++ b/src/tribler/core/components/libtorrent/tests/test_download.py @@ -421,11 +421,8 @@ def test_get_tracker_status_unicode_decode_error(test_download: Download): In this test we ensures that this types of bugs don't affect `get_tracker_status` method. See: https://github.com/Tribler/tribler/issues/7036 """ - fragile_dict = MagicMock( - __getitem__=MagicMock(side_effect=UnicodeDecodeError('', b'', 0, 0, '')) - ) - test_download.handle = MagicMock(trackers=MagicMock(return_value=[fragile_dict])) + test_download.handle = MagicMock(trackers=MagicMock(side_effect=UnicodeDecodeError('', b'', 0, 0, ''))) test_download.get_tracker_status() - assert fragile_dict.__getitem__.called + assert test_download.handle.trackers.called