Skip to content

Commit 26b0b17

Browse files
committed
Added fixture to simulate a pre-loaded client-side configuration ConfigParser object
1 parent 25725e3 commit 26b0b17

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/conftest.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
from configparser import ConfigParser
23

34
import pytest
45
from sqlmodel import Session
@@ -21,6 +22,20 @@ def start_postgres():
2122
murfey_db.commit()
2223

2324

25+
@pytest.fixture()
26+
def mock_client_configuration() -> ConfigParser:
27+
"""
28+
Returns the client-side configuration file as a pre-loaded ConfigParser object.
29+
"""
30+
config = ConfigParser()
31+
config["Murfey"] = {
32+
"instrument_name": "murfey",
33+
"server": "http://0.0.0.0:8000",
34+
"token": "pneumonoultramicroscopicsilicovolcanoconiosis",
35+
}
36+
return config
37+
38+
2439
@pytest.fixture()
2540
def mock_security_configuration(tmp_path):
2641
config_file = tmp_path / mock_security_config_name

0 commit comments

Comments
 (0)