diff --git a/nucypher/blockchain/eth/clients.py b/nucypher/blockchain/eth/clients.py index 634ec4ea0..94accf447 100644 --- a/nucypher/blockchain/eth/clients.py +++ b/nucypher/blockchain/eth/clients.py @@ -72,7 +72,7 @@ class Web3Client: ALT_PARITY = 'Parity-Ethereum' GANACHE = 'EthereumJS TestRPC' ETHEREUM_TESTER = 'EthereumTester' # (PyEVM) - SYNC_TIMEOUT_DURATION = 60 # seconds to wait for various blockchain syncing endeavors + SYNC_TIMEOUT_DURATION = 60 # seconds to wait for various blockchain syncing endeavors PEERING_TIMEOUT = 30 SYNC_SLEEP_DURATION = 5 diff --git a/nucypher/cli/actions.py b/nucypher/cli/actions.py index cef14c1cc..3c35d24ba 100644 --- a/nucypher/cli/actions.py +++ b/nucypher/cli/actions.py @@ -666,7 +666,8 @@ def select_config_file(emitter, secondary_config_files = glob.glob(glob_pattern) config_files = [*default_config_file, *secondary_config_files] if not config_files: - emitter.message(f"No {config_class._NAME} configurations found. run 'nucypher {config_class._NAME} init' then try again.", color='red') + emitter.message(f"No {config_class._NAME.capitalize()} configurations found. " + f"run 'nucypher {config_class._NAME} init' then try again.", color='red') raise click.Abort() checksum_address = checksum_address or os.environ.get(NUCYPHER_ENVVAR_WORKER_ADDRESS, None) # TODO: Deprecate worker_address in favor of checksum_address diff --git a/tests/cli/ursula/test_run_ursula.py b/tests/cli/ursula/test_run_ursula.py index 7a7a8ce05..ad14578bf 100644 --- a/tests/cli/ursula/test_run_ursula.py +++ b/tests/cli/ursula/test_run_ursula.py @@ -40,12 +40,11 @@ from nucypher.utilities.sandbox.constants import ( from nucypher.utilities.sandbox.ursula import start_pytest_ursula_services -@mock.patch('nucypher.config.characters.UrsulaConfiguration.default_filepath', return_value='/non/existent/file') +@mock.patch('glob.glob', return_value=list()) def test_missing_configuration_file(default_filepath_mock, click_runner): - cmd_args = ('ursula', 'run') + cmd_args = ('ursula', 'run', '--network', TEMPORARY_DOMAIN) result = click_runner.invoke(nucypher_cli, cmd_args, catch_exceptions=False) assert result.exit_code != 0 - assert default_filepath_mock.called assert "No Ursula configurations found. run 'nucypher ursula init' then try again." in result.output diff --git a/tests/fixtures.py b/tests/fixtures.py index cb61f7927..0ccfdcd10 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -402,7 +402,7 @@ def federated_ursulas(ursula_federated_test_config): def token_economics(testerchain): # Get current blocktime - blockchain = BlockchainInterfaceFactory.get_interface() + blockchain = BlockchainInterfaceFactory.get_interface(provider_uri=testerchain.provider_uri) now = blockchain.w3.eth.getBlock(block_identifier='latest').timestamp # Calculate instant start time @@ -568,7 +568,7 @@ def _make_agency(testerchain, test_registry, token_economics): return token_agent, staking_agent, policy_agent -@pytest.fixture(scope='module') +@pytest.fixture(scope='module', autouse=True) def test_registry_source_manager(testerchain, test_registry): class MockRegistrySource(CanonicalRegistrySource):