📦 chore(conftest.py): add fixture and example file for grouped chat JSON data
🔧 refactor(conftest.py): rename fixture `json_flow` to `openapi_json_flow` for better clarity and consistency
This commit is contained in:
parent
72f64caa41
commit
7b90c6a61f
1 changed files with 9 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ def pytest_configure():
|
||||||
pytest.OPENAPI_EXAMPLE_PATH = (
|
pytest.OPENAPI_EXAMPLE_PATH = (
|
||||||
Path(__file__).parent.absolute() / "data" / "Openapi.json"
|
Path(__file__).parent.absolute() / "data" / "Openapi.json"
|
||||||
)
|
)
|
||||||
|
pytest.GROUPED_CHAT_EXAMPLE_PATH = (
|
||||||
|
Path(__file__).parent.absolute() / "data" / "grouped_chat.json"
|
||||||
|
)
|
||||||
|
|
||||||
pytest.CODE_WITH_SYNTAX_ERROR = """
|
pytest.CODE_WITH_SYNTAX_ERROR = """
|
||||||
def get_text():
|
def get_text():
|
||||||
|
|
@ -101,6 +104,12 @@ def json_flow():
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def grouped_chat_json_flow():
|
||||||
|
with open(pytest.GROUPED_CHAT_EXAMPLE_PATH, "r") as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="session")
|
@pytest.fixture(name="session")
|
||||||
def session_fixture():
|
def session_fixture():
|
||||||
engine = create_engine(
|
engine = create_engine(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue