mirror of
https://github.com/AkitaEngineering/Akita-Meshtastic-Meshcore-Bridge.git
synced 2026-03-28 17:42:42 +01:00
22 lines
596 B
Python
22 lines
596 B
Python
import configparser
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(scope="function")
|
|
def temp_config_file(tmp_path):
|
|
config_path = tmp_path / "config.ini"
|
|
parser = configparser.ConfigParser()
|
|
parser["DEFAULT"] = {
|
|
"MESHTASTIC_SERIAL_PORT": "/dev/test_meshtastic",
|
|
"EXTERNAL_TRANSPORT": "serial",
|
|
"SERIAL_PORT": "/dev/test_meshcore",
|
|
"SERIAL_BAUD_RATE": "19200",
|
|
"SERIAL_PROTOCOL": "json_newline",
|
|
"MESSAGE_QUEUE_SIZE": "50",
|
|
"LOG_LEVEL": "DEBUG",
|
|
}
|
|
with open(config_path, "w") as f:
|
|
parser.write(f)
|
|
yield str(config_path)
|