From 386fd7a4593df6668da393359fad6afae6e7bb27 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 3 Jan 2020 01:42:54 -0500 Subject: [PATCH] updated imports after renaming component files --- lbry/extras/daemon/Daemon.py | 12 +++---- lbry/extras/daemon/component.py | 2 +- lbry/testcase.py | 6 ++-- tests/integration/other/test_cli.py | 2 +- .../unit/components/test_component_manager.py | 32 +++++++++---------- tests/unit/lbrynet_daemon/test_Daemon.py | 10 +++--- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lbry/extras/daemon/Daemon.py b/lbry/extras/daemon/Daemon.py index 8ccbb483a..85c68afa1 100644 --- a/lbry/extras/daemon/Daemon.py +++ b/lbry/extras/daemon/Daemon.py @@ -35,11 +35,11 @@ from lbry.error import ( ) from lbry.extras import system_info from lbry.extras.daemon import analytics -from lbry.extras.daemon.Components import WALLET_COMPONENT, DATABASE_COMPONENT, DHT_COMPONENT, BLOB_COMPONENT -from lbry.extras.daemon.Components import STREAM_MANAGER_COMPONENT -from lbry.extras.daemon.Components import EXCHANGE_RATE_MANAGER_COMPONENT, UPNP_COMPONENT -from lbry.extras.daemon.ComponentManager import RequiredCondition -from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.components import WALLET_COMPONENT, DATABASE_COMPONENT, DHT_COMPONENT, BLOB_COMPONENT +from lbry.extras.daemon.components import STREAM_MANAGER_COMPONENT +from lbry.extras.daemon.components import EXCHANGE_RATE_MANAGER_COMPONENT, UPNP_COMPONENT +from lbry.extras.daemon.componentmanager import RequiredCondition +from lbry.extras.daemon.componentmanager import ComponentManager from lbry.extras.daemon.json_response_encoder import JSONResponseEncoder from lbry.extras.daemon import comment_client from lbry.extras.daemon.undecorated import undecorated @@ -49,7 +49,7 @@ from lbry.schema.url import URL if typing.TYPE_CHECKING: from lbry.blob.blob_manager import BlobManager from lbry.dht.node import Node - from lbry.extras.daemon.Components import UPnPComponent + from lbry.extras.daemon.components import UPnPComponent from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager from lbry.extras.daemon.storage import SQLiteStorage from lbry.stream.stream_manager import StreamManager diff --git a/lbry/extras/daemon/component.py b/lbry/extras/daemon/component.py index 61eb9642b..cce380f85 100644 --- a/lbry/extras/daemon/component.py +++ b/lbry/extras/daemon/component.py @@ -1,7 +1,7 @@ import asyncio import logging from lbry.conf import Config -from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.componentmanager import ComponentManager log = logging.getLogger(__name__) diff --git a/lbry/testcase.py b/lbry/testcase.py index 9f99a5fb8..76241231b 100644 --- a/lbry/testcase.py +++ b/lbry/testcase.py @@ -21,12 +21,12 @@ from lbry.wallet.orchstr8 import Conductor from lbry.wallet.orchstr8.node import BlockchainNode, WalletNode from lbry.extras.daemon.Daemon import Daemon, jsonrpc_dumps_pretty -from lbry.extras.daemon.Components import Component, WalletComponent -from lbry.extras.daemon.Components import ( +from lbry.extras.daemon.components import Component, WalletComponent +from lbry.extras.daemon.components import ( DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT ) -from lbry.extras.daemon.ComponentManager import ComponentManager +from lbry.extras.daemon.componentmanager import ComponentManager from lbry.extras.daemon.exchange_rate_manager import ( ExchangeRateManager, ExchangeRate, LBRYFeed, LBRYBTCFeed ) diff --git a/tests/integration/other/test_cli.py b/tests/integration/other/test_cli.py index e363842ca..0338f79fe 100644 --- a/tests/integration/other/test_cli.py +++ b/tests/integration/other/test_cli.py @@ -4,7 +4,7 @@ from lbry.testcase import AsyncioTestCase from lbry.conf import Config from lbry.extras import cli -from lbry.extras.daemon.Components import ( +from lbry.extras.daemon.components import ( DATABASE_COMPONENT, BLOB_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, STREAM_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT diff --git a/tests/unit/components/test_component_manager.py b/tests/unit/components/test_component_manager.py index d87194133..f9d2463f5 100644 --- a/tests/unit/components/test_component_manager.py +++ b/tests/unit/components/test_component_manager.py @@ -2,11 +2,11 @@ import asyncio 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, DHT_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 +from lbry.extras.daemon.componentmanager import ComponentManager +from lbry.extras.daemon.components import DATABASE_COMPONENT, DHT_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 class TestComponentManager(AsyncioTestCase): @@ -14,19 +14,19 @@ class TestComponentManager(AsyncioTestCase): def setUp(self): self.default_components_sort = [ [ - Components.DatabaseComponent, - Components.ExchangeRateManagerComponent, - Components.UPnPComponent + components.DatabaseComponent, + components.ExchangeRateManagerComponent, + components.UPnPComponent ], [ - Components.BlobComponent, - Components.DHTComponent, - Components.WalletComponent + components.BlobComponent, + components.DHTComponent, + components.WalletComponent ], [ - Components.HashAnnouncerComponent, - Components.PeerProtocolServerComponent, - Components.StreamManagerComponent, + components.HashAnnouncerComponent, + components.PeerProtocolServerComponent, + components.StreamManagerComponent, ] ] self.component_manager = ComponentManager(Config()) @@ -63,9 +63,9 @@ class TestComponentManagerOverrides(AsyncioTestCase): new_component_manager = ComponentManager(Config(), wallet=FakeWallet) fake_wallet = new_component_manager.get_component("wallet") - # wallet should be an instance of FakeWallet and not WalletComponent from Components.py + # wallet should be an instance of FakeWallet and not WalletComponent from components.py self.assertIsInstance(fake_wallet, FakeWallet) - self.assertNotIsInstance(fake_wallet, Components.WalletComponent) + self.assertNotIsInstance(fake_wallet, components.WalletComponent) def test_init_with_wrong_overrides(self): class FakeRandomComponent: diff --git a/tests/unit/lbrynet_daemon/test_Daemon.py b/tests/unit/lbrynet_daemon/test_Daemon.py index f22deeeec..59ea9f8ba 100644 --- a/tests/unit/lbrynet_daemon/test_Daemon.py +++ b/tests/unit/lbrynet_daemon/test_Daemon.py @@ -4,11 +4,11 @@ import json from lbry.conf import Config from lbry.extras.daemon.storage import SQLiteStorage -from lbry.extras.daemon.ComponentManager import ComponentManager -from lbry.extras.daemon.Components import DATABASE_COMPONENT, DHT_COMPONENT, WALLET_COMPONENT -from lbry.extras.daemon.Components import HASH_ANNOUNCER_COMPONENT -from lbry.extras.daemon.Components import UPNP_COMPONENT, BLOB_COMPONENT -from lbry.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT +from lbry.extras.daemon.componentmanager import ComponentManager +from lbry.extras.daemon.components import DATABASE_COMPONENT, DHT_COMPONENT, WALLET_COMPONENT +from lbry.extras.daemon.components import HASH_ANNOUNCER_COMPONENT +from lbry.extras.daemon.components import UPNP_COMPONENT, BLOB_COMPONENT +from lbry.extras.daemon.components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT from lbry.extras.daemon.Daemon import Daemon as LBRYDaemon from lbry.wallet import WalletManager, Wallet