mock live RPC chainlist fetching for the entire test suite

pull/3533/head
KPrasch 2024-07-31 22:00:48 +07:00
parent e3e5b8e868
commit 7e7e52fbb2
No known key found for this signature in database
1 changed files with 8 additions and 0 deletions

View File

@ -870,3 +870,11 @@ def clear_config_root(temp_config_root):
if temp_config_root.exists(): if temp_config_root.exists():
print(f"Removing {temp_config_root}") print(f"Removing {temp_config_root}")
shutil.rmtree(Path("/tmp/nucypher-test")) shutil.rmtree(Path("/tmp/nucypher-test"))
@pytest.fixture(scope="session", autouse=True)
def mock_default_rpc_endpoint_fetch(session_mocker):
session_mocker.patch(
"nucypher.blockchain.eth.utils.get_default_rpc_endpoints",
return_value={TESTERCHAIN_CHAIN_ID: [TEST_ETH_PROVIDER_URI]},
)