diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eac4b539f..3a43f45dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ test:lint: stage: test script: - make install tools - #- make lint + - make lint test:unit: stage: test diff --git a/tests/integration/blockchain/test_network.py b/tests/integration/blockchain/test_network.py index 3fb0f77c5..31f08b3eb 100644 --- a/tests/integration/blockchain/test_network.py +++ b/tests/integration/blockchain/test_network.py @@ -5,7 +5,7 @@ import asyncio import lbry from unittest.mock import Mock -from lbry.wallet.client.basenetwork import BaseNetwork +from lbry.wallet.network import Network from lbry.wallet.orchstr8.node import SPVNode from lbry.wallet.rpc import RPCSession from lbry.testcase import IntegrationTestCase, AsyncioTestCase @@ -174,7 +174,7 @@ class ServerPickingTestCase(AsyncioTestCase): 'connect_timeout': 3 }) - network = BaseNetwork(ledger) + network = Network(ledger) self.addCleanup(network.stop) asyncio.ensure_future(network.start()) await asyncio.wait_for(network.on_connected.first, timeout=1) diff --git a/tests/integration/blockchain/test_sync.py b/tests/integration/blockchain/test_sync.py index 1ba24ac96..7af2bd1aa 100644 --- a/tests/integration/blockchain/test_sync.py +++ b/tests/integration/blockchain/test_sync.py @@ -2,6 +2,7 @@ import asyncio import logging from lbry.testcase import IntegrationTestCase, WalletNode from lbry.constants import CENT +from lbry.wallet import WalletManager, RegTestLedger, Transaction, Output class SyncTests(IntegrationTestCase): @@ -23,11 +24,7 @@ class SyncTests(IntegrationTestCase): async def make_wallet_node(self, seed=None): self.api_port += 1 - wallet_node = WalletNode( - self.wallet_node.manager_class, - self.wallet_node.ledger_class, - port=self.api_port - ) + wallet_node = WalletNode(WalletManager, RegTestLedger, port=self.api_port) await wallet_node.start(self.conductor.spv_node, seed) self.started_nodes.append(wallet_node) return wallet_node @@ -71,9 +68,9 @@ class SyncTests(IntegrationTestCase): # pay 0.01 from main node to receiving node, would have increased change addresses address0 = (await account0.receiving.get_addresses())[0] hash0 = self.ledger.address_to_hash160(address0) - tx = await account1.ledger.transaction_class.create( + tx = await Transaction.create( [], - [self.ledger.transaction_class.output_class.pay_pubkey_hash(CENT, hash0)], + [Output.pay_pubkey_hash(CENT, hash0)], [account1], account1 ) await self.broadcast(tx) diff --git a/tests/integration/blockchain/test_transactions.py b/tests/integration/blockchain/test_transactions.py index 2eac1e7f4..82aa9c16a 100644 --- a/tests/integration/blockchain/test_transactions.py +++ b/tests/integration/blockchain/test_transactions.py @@ -4,7 +4,7 @@ from itertools import chain from lbry.wallet.transaction import Transaction, Output, Input from lbry.testcase import IntegrationTestCase -from lbry.wallet.client.util import satoshis_to_coins, coins_to_satoshis +from lbry.wallet.util import satoshis_to_coins, coins_to_satoshis class BasicTransactionTests(IntegrationTestCase): diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index 664fa025e..59b44a450 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -2,7 +2,7 @@ import asyncio import lbry import lbry.wallet -from lbry.wallet.client.basenetwork import ClientSession +from lbry.wallet.network import ClientSession from lbry.testcase import IntegrationTestCase