diff --git a/tests/integration/blockchain/test_network.py b/tests/integration/blockchain/test_network.py index 879693d4c..f1ee5c5e2 100644 --- a/tests/integration/blockchain/test_network.py +++ b/tests/integration/blockchain/test_network.py @@ -37,6 +37,12 @@ class NetworkTests(IntegrationTestCase): }, await self.ledger.network.get_server_features()) # await self.conductor.spv_node.stop() payment_address, donation_address = await self.account.get_addresses(limit=2) + + original_address = self.conductor.spv_node.server.env.payment_address + original_donation_address = self.conductor.spv_node.server.env.donation_address + original_description = self.conductor.spv_node.server.env.description + original_daily_fee = self.conductor.spv_node.server.env.daily_fee + self.conductor.spv_node.server.env.payment_address = payment_address self.conductor.spv_node.server.env.donation_address = donation_address self.conductor.spv_node.server.env.description = 'Fastest server in the west.' @@ -61,6 +67,13 @@ class NetworkTests(IntegrationTestCase): 'trending_algorithm': 'fast_ar', }, await self.ledger.network.get_server_features()) + # cleanup the changes since the attributes are set on the class + self.conductor.spv_node.server.env.payment_address = original_address + self.conductor.spv_node.server.env.donation_address = original_donation_address + self.conductor.spv_node.server.env.description = original_description + self.conductor.spv_node.server.env.daily_fee = original_daily_fee + LBRYElectrumX.set_server_features(self.conductor.spv_node.server.env) + class ReconnectTests(IntegrationTestCase): @@ -156,7 +169,6 @@ class ReconnectTests(IntegrationTestCase): class UDPServerFailDiscoveryTest(AsyncioTestCase): - async def test_wallet_connects_despite_lack_of_udp(self): conductor = Conductor() conductor.spv_node.udp_port = '0' diff --git a/tests/integration/blockchain/test_wallet_commands.py b/tests/integration/blockchain/test_wallet_commands.py index 17e950425..6bce6311c 100644 --- a/tests/integration/blockchain/test_wallet_commands.py +++ b/tests/integration/blockchain/test_wallet_commands.py @@ -47,7 +47,7 @@ class WalletCommands(CommandTestCase): status = await self.daemon.jsonrpc_status() self.assertEqual(len(status['wallet']['servers']), 1) self.assertEqual(status['wallet']['servers'][0]['port'], 50002) - await self.conductor.spv_node.stop(True) + await self.conductor.spv_node.stop() self.conductor.spv_node.port = 54320 await self.conductor.spv_node.start(self.conductor.lbcwallet_node) status = await self.daemon.jsonrpc_status() diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index 50ed9e7df..dcad240d9 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -45,7 +45,7 @@ class TestSessions(IntegrationTestCase): class TestUsagePayment(CommandTestCase): - async def _test_single_server_payment(self): + async def test_single_server_payment(self): wallet_pay_service = self.daemon.component_manager.get_component('wallet_server_payments') wallet_pay_service.payment_period = 1 # only starts with a positive max key fee @@ -63,7 +63,7 @@ class TestUsagePayment(CommandTestCase): self.assertEqual(history, []) node = SPVNode(self.conductor.spv_module, node_number=2) - await node.start(self.blockchain, extraconf={"PAYMENT_ADDRESS": address, "DAILY_FEE": "1.1"}) + await node.start(self.blockchain, extraconf={"payment_address": address, "daily_fee": "1.1"}) self.addCleanup(node.stop) self.daemon.jsonrpc_settings_set('lbryum_servers', [f"{node.hostname}:{node.port}"]) await self.daemon.jsonrpc_wallet_reconnect()