Skip to content

Commit

Permalink
updated imports after renaming component files
Browse files Browse the repository at this point in the history
  • Loading branch information
eukreign committed Jan 3, 2020
1 parent d4f4190 commit 386fd7a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions lbry/extras/daemon/Daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
)
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
Expand All @@ -49,7 +49,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion lbry/extras/daemon/component.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions lbry/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/other/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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
Expand Down
32 changes: 16 additions & 16 deletions tests/unit/components/test_component_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
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):

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())
Expand Down Expand Up @@ -63,9 +63,9 @@ def component(self):

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:
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/lbrynet_daemon/test_Daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

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

Expand Down

0 comments on commit 386fd7a

Please sign in to comment.