mirror of https://github.com/nucypher/nucypher.git
Ensure allocation registry is passed onto test agency
parent
3818cef773
commit
dceabd8d04
|
@ -93,6 +93,8 @@ TEMPORARY_DOMAIN = 'TEMPORARY_DOMAIN'
|
|||
|
||||
MOCK_REGISTRY_FILEPATH = os.path.join(BASE_TEMP_DIR, f'{BASE_TEMP_PREFIX}mock-registry-{str(datetime.now())}.json')
|
||||
|
||||
TEMPORARY_DOMAIN = ':TEMPORARY_DOMAIN:' # for use with `--dev` node runtimes
|
||||
|
||||
GETH_DEV_URI = f'ipc://{BASE_TEMP_DIR}/geth.ipc' # Standard IPC path for `geth --dev`
|
||||
|
||||
PYEVM_DEV_URI = "tester://pyevm"
|
||||
|
@ -109,3 +111,4 @@ MOCK_IP_ADDRESS = '0.0.0.0'
|
|||
MOCK_IP_ADDRESS_2 = '10.10.10.10'
|
||||
|
||||
MOCK_URSULA_DB_FILEPATH = ':memory:'
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import os
|
|||
|
||||
from nucypher.blockchain.eth.agents import NucypherTokenAgent, MinerAgent, UserEscrowAgent
|
||||
from nucypher.blockchain.eth.constants import MAX_ALLOWED_LOCKED
|
||||
from nucypher.blockchain.eth.registry import AllocationRegistry
|
||||
from nucypher.cli.deploy import deploy
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
||||
from nucypher.utilities.sandbox.constants import (
|
||||
|
@ -64,7 +65,8 @@ def test_nucypher_deploy_allocations(testerchain, click_runner, mock_allocation_
|
|||
|
||||
# ensure that a pre-allocation recipient has the allocated token quantity.
|
||||
beneficiary = testerchain.interface.w3.eth.accounts[-1]
|
||||
user_escrow_agent = UserEscrowAgent(beneficiary=beneficiary)
|
||||
allocation_registry = AllocationRegistry(registry_filepath=MOCK_ALLOCATION_REGISTRY_FILEPATH)
|
||||
user_escrow_agent = UserEscrowAgent(beneficiary=beneficiary, allocation_registry=allocation_registry)
|
||||
assert user_escrow_agent.unvested_tokens == MAX_ALLOWED_LOCKED
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue