forked from diem/client-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
18 lines (15 loc) · 705 Bytes
/
conftest.py
File metadata and controls
18 lines (15 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Copyright (c) The Diem Core Contributors
# SPDX-License-Identifier: Apache-2.0
from diem import chain_ids, testnet
import pytest, os
@pytest.fixture(scope="session", autouse=True)
def setup_testnet() -> None:
if os.getenv("dt"):
os.system("make docker")
print("swap testnet default values to local testnet launched by docker-compose")
os.environ["DIEM_JSON_RPC_URL"] = "http://localhost:8080/v1"
os.environ["DIEM_FAUCET_URL"] = "http://localhost:8000/mint"
testnet.JSON_RPC_URL = "http://localhost:8080/v1"
testnet.FAUCET_URL = "http://localhost:8000/mint"
testnet.CHAIN_ID = chain_ids.TESTING
chain_ids.TESTNET = chain_ids.TESTING