def test_get_infura_id(monkeypatch): # no envvar if ENV_INFURA_PROJECT_ID in os.environ: monkeypatch.delenv(ENV_INFURA_PROJECT_ID) assert util.get_infura_id() == util.WEB3_INFURA_PROJECT_ID # envvar is other val monkeypatch.setenv(ENV_INFURA_PROJECT_ID, "foo_id") assert util.get_infura_id() == "foo_id"
def get_network_config(network_name): config = ExampleConfig.get_base_config() config['eth-network']['network'] = get_infura_url( get_infura_id(), network_name) config['eth-network']['artifacts.path'] = 'artifacts' return config
def get_network_config(network_name): config = ExampleConfig.get_base_config() config["eth-network"]["network"] = get_infura_url( get_infura_id(), network_name) config["eth-network"]["artifacts.path"] = "artifacts" return config