mirror of https://github.com/nucypher/nucypher.git
Testing failed init of StakingEscrowAgent due to contract not deployed
parent
72bf708245
commit
6ca6c4cbcc
|
@ -218,7 +218,7 @@ class EthereumContractRegistry:
|
|||
raise self.IllegalRegistry(message)
|
||||
|
||||
if not contracts:
|
||||
raise self.UnknownContract(": {}".format(contract_name))
|
||||
raise self.UnknownContract(contract_name)
|
||||
|
||||
if contract_address and len(contracts) > 1:
|
||||
m = "Multiple records returned for address {}"
|
||||
|
|
|
@ -22,10 +22,19 @@ from eth_utils.address import to_checksum_address, is_address
|
|||
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface
|
||||
from nucypher.blockchain.eth.registry import EthereumContractRegistry
|
||||
from nucypher.crypto.powers import TransactingPower
|
||||
from nucypher.utilities.sandbox.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
||||
|
||||
@pytest.mark.slow()
|
||||
def test_unknown_contract(testerchain):
|
||||
with pytest.raises(EthereumContractRegistry.UnknownContract) as exception:
|
||||
_staking_agent = StakingEscrowAgent(blockchain=testerchain)
|
||||
|
||||
assert exception.value.args[0] == StakingEscrowAgent.registry_contract_name
|
||||
|
||||
|
||||
@pytest.mark.slow()
|
||||
def test_deposit_tokens(testerchain, agency, token_economics):
|
||||
token_agent, staking_agent, _policy_agent = agency
|
||||
|
|
Loading…
Reference in New Issue