mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 23:46:50 +00:00
refactor(tests): reorganize tests into unittest/ and e2e/ directories
- Move all unit tests from tests/ to tests/unittest/ - Add tests/e2e/ directory for end-to-end tests - Update conftest.py for new test structure - Add new tests for auth dependencies, policies, route injection - Add new tests for run callbacks, create store, execution artifacts - Remove obsolete tests for deleted persistence layer Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from deerflow.config.model_config import ModelConfig
|
||||
|
||||
|
||||
def _make_model(**overrides) -> ModelConfig:
|
||||
return ModelConfig(
|
||||
name="openai-responses",
|
||||
display_name="OpenAI Responses",
|
||||
description=None,
|
||||
use="langchain_openai:ChatOpenAI",
|
||||
model="gpt-5",
|
||||
**overrides,
|
||||
)
|
||||
|
||||
|
||||
def test_responses_api_fields_are_declared_in_model_schema():
|
||||
assert "use_responses_api" in ModelConfig.model_fields
|
||||
assert "output_version" in ModelConfig.model_fields
|
||||
|
||||
|
||||
def test_responses_api_fields_round_trip_in_model_dump():
|
||||
config = _make_model(
|
||||
api_key="$OPENAI_API_KEY",
|
||||
use_responses_api=True,
|
||||
output_version="responses/v1",
|
||||
)
|
||||
|
||||
dumped = config.model_dump(exclude_none=True)
|
||||
|
||||
assert dumped["use_responses_api"] is True
|
||||
assert dumped["output_version"] == "responses/v1"
|
||||
Reference in New Issue
Block a user