forked from LBRYCommunity/lbry-sdk
updated imports after renaming component files
This commit is contained in:
parent
d4f41901ef
commit
386fd7a459
6 changed files with 32 additions and 32 deletions
|
@ -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
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue