Delete unecessary tests
This commit is contained in:
parent
156bba3359
commit
2e06cf5277
3 changed files with 0 additions and 69 deletions
|
|
@ -45,17 +45,6 @@ def test_run_agent_input_parsing():
|
||||||
assert input_data.state == {"question": "What is AI?"}
|
assert input_data.state == {"question": "What is AI?"}
|
||||||
|
|
||||||
|
|
||||||
def test_run_agent_input_defaults():
|
|
||||||
"""Test RunAgentInput with defaults."""
|
|
||||||
input_data = RunAgentInput() # type: ignore[call-arg]
|
|
||||||
|
|
||||||
assert input_data.thread_id is None
|
|
||||||
assert input_data.run_id is None
|
|
||||||
assert input_data.state == {}
|
|
||||||
assert input_data.messages == []
|
|
||||||
assert input_data.config == {}
|
|
||||||
|
|
||||||
|
|
||||||
def test_format_sse_event():
|
def test_format_sse_event():
|
||||||
"""Test SSE event formatting."""
|
"""Test SSE event formatting."""
|
||||||
event = {"type": "TEST_EVENT", "data": "test"}
|
event = {"type": "TEST_EVENT", "data": "test"}
|
||||||
|
|
@ -236,15 +225,3 @@ def test_server_cors_headers():
|
||||||
assert (
|
assert (
|
||||||
"access-control-allow-origin" in response.headers or response.status_code == 200
|
"access-control-allow-origin" in response.headers or response.status_code == 200
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_agui_config_defaults():
|
|
||||||
"""Test AGUIConfig default values."""
|
|
||||||
config = AGUIConfig()
|
|
||||||
|
|
||||||
assert config.host == "0.0.0.0"
|
|
||||||
assert config.port == 8000
|
|
||||||
assert config.cors_origins == ["*"]
|
|
||||||
assert config.cors_credentials is True
|
|
||||||
assert "GET" in config.cors_methods
|
|
||||||
assert "POST" in config.cors_methods
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import pytest
|
||||||
from pydantic_ai.models.test import TestModel
|
from pydantic_ai.models.test import TestModel
|
||||||
|
|
||||||
from haiku.rag.client import HaikuRAG
|
from haiku.rag.client import HaikuRAG
|
||||||
from haiku.rag.graph.common.models import SearchAnswer
|
|
||||||
from haiku.rag.graph.deep_qa.dependencies import DeepQAContext
|
from haiku.rag.graph.deep_qa.dependencies import DeepQAContext
|
||||||
from haiku.rag.graph.deep_qa.graph import build_deep_qa_graph
|
from haiku.rag.graph.deep_qa.graph import build_deep_qa_graph
|
||||||
from haiku.rag.graph.deep_qa.state import DeepQADeps, DeepQAState
|
from haiku.rag.graph.deep_qa.state import DeepQADeps, DeepQAState
|
||||||
|
|
@ -40,33 +39,3 @@ async def test_deep_qa_graph_end_to_end(monkeypatch, temp_db_path):
|
||||||
assert isinstance(result.answer, str)
|
assert isinstance(result.answer, str)
|
||||||
|
|
||||||
client.close()
|
client.close()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_deep_qa_context_operations():
|
|
||||||
context = DeepQAContext(original_question="Test question?")
|
|
||||||
|
|
||||||
assert context.original_question == "Test question?"
|
|
||||||
assert context.sub_questions == []
|
|
||||||
assert context.qa_responses == []
|
|
||||||
|
|
||||||
context.sub_questions = ["Sub Q1", "Sub Q2"]
|
|
||||||
assert len(context.sub_questions) == 2
|
|
||||||
|
|
||||||
qa = SearchAnswer(
|
|
||||||
query="Sub Q1",
|
|
||||||
answer="Answer 1",
|
|
||||||
cited_chunks=["chunk_1", "chunk_2"],
|
|
||||||
confidence=0.9,
|
|
||||||
)
|
|
||||||
context.add_qa_response(qa)
|
|
||||||
assert len(context.qa_responses) == 1
|
|
||||||
assert context.qa_responses[0].query == "Sub Q1"
|
|
||||||
|
|
||||||
|
|
||||||
def test_deep_qa_state_initialization():
|
|
||||||
context = DeepQAContext(original_question="Test?")
|
|
||||||
state = DeepQAState(context=context, max_sub_questions=5)
|
|
||||||
|
|
||||||
assert state.context.original_question == "Test?"
|
|
||||||
assert state.max_sub_questions == 5
|
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,6 @@ from haiku.rag.graph.research.graph import build_research_graph
|
||||||
from haiku.rag.graph.research.state import ResearchDeps, ResearchState
|
from haiku.rag.graph.research.state import ResearchDeps, ResearchState
|
||||||
|
|
||||||
|
|
||||||
def test_build_graph_and_state():
|
|
||||||
graph = build_research_graph()
|
|
||||||
assert graph is not None
|
|
||||||
|
|
||||||
state = ResearchState(
|
|
||||||
context=ResearchContext(
|
|
||||||
original_question="What are the key features of haiku.rag?"
|
|
||||||
),
|
|
||||||
max_iterations=1,
|
|
||||||
confidence_threshold=0.8,
|
|
||||||
)
|
|
||||||
assert state.iterations == 0
|
|
||||||
assert state.context.sub_questions == []
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_graph_end_to_end_with_test_model(monkeypatch, temp_db_path):
|
async def test_graph_end_to_end_with_test_model(monkeypatch, temp_db_path):
|
||||||
"""Test research graph with mocked LLM using AG-UI events."""
|
"""Test research graph with mocked LLM using AG-UI events."""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue