From 32a7d1a4a02e1e5412258279b760905f4840c29d Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 15 Oct 2021 04:14:35 -0300 Subject: [PATCH] fix tests --- tests/integration/other/test_cli.py | 4 ++-- tests/unit/components/test_component_manager.py | 8 ++++++-- tests/unit/lbrynet_daemon/test_allowed_origin.py | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/integration/other/test_cli.py b/tests/integration/other/test_cli.py index 968665333..ec28bbee3 100644 --- a/tests/integration/other/test_cli.py +++ b/tests/integration/other/test_cli.py @@ -10,7 +10,7 @@ from lbry.extras.daemon.components import ( DATABASE_COMPONENT, DISK_SPACE_COMPONENT, BLOB_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, FILE_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, WALLET_SERVER_PAYMENTS_COMPONENT, - LIBTORRENT_COMPONENT + LIBTORRENT_COMPONENT, BACKGROUND_DOWNLOADER_COMPONENT ) from lbry.extras.daemon.daemon import Daemon @@ -26,7 +26,7 @@ class CLIIntegrationTest(AsyncioTestCase): DATABASE_COMPONENT, DISK_SPACE_COMPONENT, BLOB_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, FILE_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, WALLET_SERVER_PAYMENTS_COMPONENT, - LIBTORRENT_COMPONENT + LIBTORRENT_COMPONENT, BACKGROUND_DOWNLOADER_COMPONENT ) Daemon.component_attributes = {} self.daemon = Daemon(conf) diff --git a/tests/unit/components/test_component_manager.py b/tests/unit/components/test_component_manager.py index af7f19c33..fa5ceafb4 100644 --- a/tests/unit/components/test_component_manager.py +++ b/tests/unit/components/test_component_manager.py @@ -3,7 +3,8 @@ from lbry.testcase import AsyncioTestCase, AdvanceTimeTestCase from lbry.conf import Config from lbry.extras.daemon.componentmanager import ComponentManager -from lbry.extras.daemon.components import DATABASE_COMPONENT, DISK_SPACE_COMPONENT, DHT_COMPONENT +from lbry.extras.daemon.components import DATABASE_COMPONENT, DISK_SPACE_COMPONENT, DHT_COMPONENT, \ + BACKGROUND_DOWNLOADER_COMPONENT from lbry.extras.daemon.components import HASH_ANNOUNCER_COMPONENT, UPNP_COMPONENT from lbry.extras.daemon.components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT from lbry.extras.daemon import components @@ -30,6 +31,9 @@ class TestComponentManager(AsyncioTestCase): components.HashAnnouncerComponent, components.PeerProtocolServerComponent, components.WalletServerPaymentsComponent + ], + [ + components.BackgroundDownloader ] ] self.component_manager = ComponentManager(Config()) @@ -154,7 +158,7 @@ class TestComponentManagerProperStart(AdvanceTimeTestCase): Config(), skip_components=[ DATABASE_COMPONENT, DISK_SPACE_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, - PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, + PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, BACKGROUND_DOWNLOADER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT], wallet=FakeDelayedWallet, file_manager=FakeDelayedFileManager, diff --git a/tests/unit/lbrynet_daemon/test_allowed_origin.py b/tests/unit/lbrynet_daemon/test_allowed_origin.py index 6316db0a0..b70fe6d3f 100644 --- a/tests/unit/lbrynet_daemon/test_allowed_origin.py +++ b/tests/unit/lbrynet_daemon/test_allowed_origin.py @@ -11,7 +11,7 @@ from lbry.extras.daemon.components import ( DATABASE_COMPONENT, DISK_SPACE_COMPONENT, BLOB_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, FILE_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, WALLET_SERVER_PAYMENTS_COMPONENT, - LIBTORRENT_COMPONENT + LIBTORRENT_COMPONENT, BACKGROUND_DOWNLOADER_COMPONENT ) from lbry.extras.daemon.daemon import Daemon @@ -72,7 +72,7 @@ class TestAccessHeaders(AsyncioTestCase): DATABASE_COMPONENT, DISK_SPACE_COMPONENT, BLOB_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, FILE_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, WALLET_SERVER_PAYMENTS_COMPONENT, - LIBTORRENT_COMPONENT + LIBTORRENT_COMPONENT, BACKGROUND_DOWNLOADER_COMPONENT ) Daemon.component_attributes = {} self.daemon = Daemon(conf)