updated imports after renaming component files

This commit is contained in:
Lex Berezhny 2020-01-03 01:42:54 -05:00
parent d4f41901ef
commit 386fd7a459
6 changed files with 32 additions and 32 deletions

View file

@ -35,11 +35,11 @@ from lbry.error import (
) )
from lbry.extras import system_info from lbry.extras import system_info
from lbry.extras.daemon import analytics 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 WALLET_COMPONENT, DATABASE_COMPONENT, DHT_COMPONENT, BLOB_COMPONENT
from lbry.extras.daemon.Components import STREAM_MANAGER_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.components import EXCHANGE_RATE_MANAGER_COMPONENT, UPNP_COMPONENT
from lbry.extras.daemon.ComponentManager import RequiredCondition from lbry.extras.daemon.componentmanager import RequiredCondition
from lbry.extras.daemon.ComponentManager import ComponentManager from lbry.extras.daemon.componentmanager import ComponentManager
from lbry.extras.daemon.json_response_encoder import JSONResponseEncoder from lbry.extras.daemon.json_response_encoder import JSONResponseEncoder
from lbry.extras.daemon import comment_client from lbry.extras.daemon import comment_client
from lbry.extras.daemon.undecorated import undecorated from lbry.extras.daemon.undecorated import undecorated
@ -49,7 +49,7 @@ from lbry.schema.url import URL
if typing.TYPE_CHECKING: if typing.TYPE_CHECKING:
from lbry.blob.blob_manager import BlobManager from lbry.blob.blob_manager import BlobManager
from lbry.dht.node import Node 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.exchange_rate_manager import ExchangeRateManager
from lbry.extras.daemon.storage import SQLiteStorage from lbry.extras.daemon.storage import SQLiteStorage
from lbry.stream.stream_manager import StreamManager from lbry.stream.stream_manager import StreamManager

View file

@ -1,7 +1,7 @@
import asyncio import asyncio
import logging import logging
from lbry.conf import Config from lbry.conf import Config
from lbry.extras.daemon.ComponentManager import ComponentManager from lbry.extras.daemon.componentmanager import ComponentManager
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View file

@ -21,12 +21,12 @@ from lbry.wallet.orchstr8 import Conductor
from lbry.wallet.orchstr8.node import BlockchainNode, WalletNode from lbry.wallet.orchstr8.node import BlockchainNode, WalletNode
from lbry.extras.daemon.Daemon import Daemon, jsonrpc_dumps_pretty from lbry.extras.daemon.Daemon import Daemon, jsonrpc_dumps_pretty
from lbry.extras.daemon.Components import Component, WalletComponent from lbry.extras.daemon.components import Component, WalletComponent
from lbry.extras.daemon.Components import ( from lbry.extras.daemon.components import (
DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT,
UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_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 ( from lbry.extras.daemon.exchange_rate_manager import (
ExchangeRateManager, ExchangeRate, LBRYFeed, LBRYBTCFeed ExchangeRateManager, ExchangeRate, LBRYFeed, LBRYBTCFeed
) )

View file

@ -4,7 +4,7 @@ from lbry.testcase import AsyncioTestCase
from lbry.conf import Config from lbry.conf import Config
from lbry.extras import cli 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, DATABASE_COMPONENT, BLOB_COMPONENT, WALLET_COMPONENT, DHT_COMPONENT,
HASH_ANNOUNCER_COMPONENT, STREAM_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT, HASH_ANNOUNCER_COMPONENT, STREAM_MANAGER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT,
UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT

View file

@ -2,11 +2,11 @@ import asyncio
from lbry.testcase import AsyncioTestCase, AdvanceTimeTestCase from lbry.testcase import AsyncioTestCase, AdvanceTimeTestCase
from lbry.conf import Config from lbry.conf import Config
from lbry.extras.daemon.ComponentManager import ComponentManager from lbry.extras.daemon.componentmanager import ComponentManager
from lbry.extras.daemon.Components import DATABASE_COMPONENT, DHT_COMPONENT 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 HASH_ANNOUNCER_COMPONENT, UPNP_COMPONENT
from lbry.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_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 import components
class TestComponentManager(AsyncioTestCase): class TestComponentManager(AsyncioTestCase):
@ -14,19 +14,19 @@ class TestComponentManager(AsyncioTestCase):
def setUp(self): def setUp(self):
self.default_components_sort = [ self.default_components_sort = [
[ [
Components.DatabaseComponent, components.DatabaseComponent,
Components.ExchangeRateManagerComponent, components.ExchangeRateManagerComponent,
Components.UPnPComponent components.UPnPComponent
], ],
[ [
Components.BlobComponent, components.BlobComponent,
Components.DHTComponent, components.DHTComponent,
Components.WalletComponent components.WalletComponent
], ],
[ [
Components.HashAnnouncerComponent, components.HashAnnouncerComponent,
Components.PeerProtocolServerComponent, components.PeerProtocolServerComponent,
Components.StreamManagerComponent, components.StreamManagerComponent,
] ]
] ]
self.component_manager = ComponentManager(Config()) self.component_manager = ComponentManager(Config())
@ -63,9 +63,9 @@ class TestComponentManagerOverrides(AsyncioTestCase):
new_component_manager = ComponentManager(Config(), wallet=FakeWallet) new_component_manager = ComponentManager(Config(), wallet=FakeWallet)
fake_wallet = new_component_manager.get_component("wallet") 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.assertIsInstance(fake_wallet, FakeWallet)
self.assertNotIsInstance(fake_wallet, Components.WalletComponent) self.assertNotIsInstance(fake_wallet, components.WalletComponent)
def test_init_with_wrong_overrides(self): def test_init_with_wrong_overrides(self):
class FakeRandomComponent: class FakeRandomComponent:

View file

@ -4,11 +4,11 @@ import json
from lbry.conf import Config from lbry.conf import Config
from lbry.extras.daemon.storage import SQLiteStorage from lbry.extras.daemon.storage import SQLiteStorage
from lbry.extras.daemon.ComponentManager import ComponentManager 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 DATABASE_COMPONENT, DHT_COMPONENT, WALLET_COMPONENT
from lbry.extras.daemon.Components import HASH_ANNOUNCER_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 UPNP_COMPONENT, BLOB_COMPONENT
from lbry.extras.daemon.Components import PEER_PROTOCOL_SERVER_COMPONENT, EXCHANGE_RATE_MANAGER_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.extras.daemon.Daemon import Daemon as LBRYDaemon
from lbry.wallet import WalletManager, Wallet from lbry.wallet import WalletManager, Wallet