From 7a25f2ca0d6e6e12d5c52a20310fbb9335c38c4f Mon Sep 17 00:00:00 2001 From: vzotova Date: Fri, 21 Feb 2020 14:04:04 +0300 Subject: [PATCH] Fix #1726 --- .../eth/contracts/test_contracts_upgradeability.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/blockchain/eth/contracts/test_contracts_upgradeability.py b/tests/blockchain/eth/contracts/test_contracts_upgradeability.py index 96030cb23..b329b7b10 100644 --- a/tests/blockchain/eth/contracts/test_contracts_upgradeability.py +++ b/tests/blockchain/eth/contracts/test_contracts_upgradeability.py @@ -103,7 +103,8 @@ def test_upgradeability(temp_dir_path, token_economics): SourceDirs(temp_dir_path)]) # Prepare the blockchain - blockchain_interface = BlockchainDeployerInterface(provider_uri='tester://pyevm/2', compiler=solidity_compiler) + provider_uri = 'tester://pyevm/2' + blockchain_interface = BlockchainDeployerInterface(provider_uri=provider_uri, compiler=solidity_compiler) blockchain_interface.connect() origin = blockchain_interface.client.accounts[0] BlockchainInterfaceFactory.register_interface(interface=blockchain_interface) @@ -120,6 +121,8 @@ def test_upgradeability(temp_dir_path, token_economics): test_policy_manager = len(raw_contracts[contract_name]) > 1 if not test_adjudicator and not test_staking_escrow and not test_policy_manager: + # Unregister interface + del BlockchainInterfaceFactory._interfaces[provider_uri] return # Prepare master version of contracts and upgrade to the latest @@ -142,3 +145,6 @@ def test_upgradeability(temp_dir_path, token_economics): adjudicator_deployer = AdjudicatorDeployer(registry=registry, deployer_address=origin) deploy_earliest_contract(blockchain_interface, adjudicator_deployer, secret=ADJUDICATOR_DEPLOYMENT_SECRET) upgrade_to_latest_contract(adjudicator_deployer, secret=ADJUDICATOR_DEPLOYMENT_SECRET) + + # Unregister interface + del BlockchainInterfaceFactory._interfaces[provider_uri]