コード例 #1
0
ファイル: test_util.py プロジェクト: akshay-ap/ocean.py
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"
コード例 #2
0
 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
コード例 #3
0
 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