mirror of
https://github.com/jillesca/pyats_server.git
synced 2026-11-18 18:04:21 +00:00
22 lines
459 B
Python
22 lines
459 B
Python
"""
|
|
Load test settings from JSON file.
|
|
Not intended to be used as a standalone script.
|
|
"""
|
|
|
|
import json
|
|
|
|
TEST_SETTINGS_FILE = "tests/settings.json"
|
|
|
|
|
|
def load_json_file(json_file: str) -> dict:
|
|
"""
|
|
Load JSON file.
|
|
"""
|
|
with open(json_file, encoding="utf-8") as f:
|
|
return json.load(f)
|
|
|
|
|
|
test_config = load_json_file(json_file=TEST_SETTINGS_FILE)
|
|
DEVICE_NAME = test_config.get("device")
|
|
INTERFACE_NAME = test_config.get("interface_name")
|