Assertion for staking interface router ownership transfer via CLI.

pull/2369/head
Kieran Prasch 2020-10-14 20:56:13 -07:00 committed by David Núñez
parent 97aff893fb
commit abc24eba8f
1 changed files with 10 additions and 10 deletions

View File

@ -32,7 +32,7 @@ from nucypher.blockchain.eth.constants import (
POLICY_MANAGER_CONTRACT_NAME,
STAKING_ESCROW_CONTRACT_NAME
)
from nucypher.blockchain.eth.deployers import StakingEscrowDeployer
from nucypher.blockchain.eth.deployers import StakingEscrowDeployer, StakingInterfaceDeployer
from nucypher.blockchain.eth.registry import InMemoryContractRegistry, LocalContractRegistry
from nucypher.cli.commands.deploy import deploy
from nucypher.config.constants import TEMPORARY_DOMAIN
@ -160,11 +160,16 @@ def test_transfer_ownership(click_runner, testerchain, agency_local_registry):
assert policy_agent.owner == testerchain.etherbase_account
assert adjudicator_agent.owner == testerchain.etherbase_account
#### BEGIN HOTFIX TEST
# Test transfer ownersh
def test_transfer_ownership_staking_interface_router(click_runner, testerchain, agency_local_registry):
maclane = testerchain.unassigned_accounts[0]
ownership_command = ('transfer-ownership',
'--registry-infile', agency_local_registry.filepath,
'--contract-name', 'StakingInterface',
'--contract-name', StakingInterfaceDeployer.contract_name,
'--provider', TEST_PROVIDER_URI,
'--network', TEMPORARY_DOMAIN,
'--target-address', maclane,
@ -180,14 +185,9 @@ def test_transfer_ownership(click_runner, testerchain, agency_local_registry):
catch_exceptions=False)
assert result.exit_code == 0, result.output
# All of these are unchanged
assert staking_agent.owner == michwill
assert policy_agent.owner == testerchain.etherbase_account
assert adjudicator_agent.owner == testerchain.etherbase_account
# TODO: Assert the new owner is correct
# This owner is updated
# assert interface_agent.owner == maclane
interface_deployer = StakingInterfaceDeployer(registry=agency_local_registry)
assert interface_deployer.owner == maclane
def test_bare_contract_deployment_to_alternate_registry(click_runner, agency_local_registry):