Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Oct 6, 2021
1 parent 3925286 commit 8708a6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def mock_remove_download(download_obj, **_):
# Test regenerating a non-empty channel
gigachannel_manager.updated_my_channel = Mock()
metadata_store.ChannelMetadata.consolidate_channel_torrent = lambda *_: Mock()
with patch("tribler_core.modules.libtorrent.torrentdef.TorrentDef.load_from_dict"):
with patch("tribler_core.components.libtorrent.torrentdef.TorrentDef.load_from_dict"):
await gigachannel_manager.regenerate_channel_torrent(chan_pk, chan_id)
gigachannel_manager.updated_my_channel.assert_called_once()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
from tribler_core.utilities.utilities import bdecode_compat

SPEC_FILENAME = 'download_config.spec'
CONFIG_SPEC_PATH = get_lib_path() / 'modules' / 'libtorrent' / SPEC_FILENAME
CONFIG_SPEC_PATH = get_lib_path() / 'components/libtorrent/download_manager' / SPEC_FILENAME
NONPERSISTENT_DEFAULTS = {}


class DownloadConfig:
def __init__(self, config=None, state_dir=None):
self.config = config or ConfigObj(configspec=str(CONFIG_SPEC_PATH), default_encoding='utf8')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def mock_http_query(*_):
with open(tmp_path / "ubuntu.torrent", 'rb') as f:
return f.read()

with patch("tribler_core.modules.libtorrent.restapi.torrentinfo_endpoint.query_http_uri", new=mock_http_query):
with patch("tribler_core.components.libtorrent.restapi.torrentinfo_endpoint.query_http_uri", new=mock_http_query):
verify_valid_dict(await do_request(rest_api, f'torrentinfo?uri={quote_plus(path)}', expected_code=200))

path = quote_plus(f'magnet:?xt=urn:btih:{hexlify(UBUNTU_1504_INFOHASH)}'
Expand Down

0 comments on commit 8708a6a

Please sign in to comment.