fix: failing tests and warnings
ref: N25B-449
This commit is contained in:
@@ -63,7 +63,7 @@ async def test_send_to_bdi_belief(agent):
|
||||
"""Verify belief update format."""
|
||||
context_str = "some_goal"
|
||||
|
||||
await agent._send_to_bdi_belief(context_str)
|
||||
await agent._send_to_bdi_belief(context_str, "goal")
|
||||
|
||||
assert agent.send.await_count == 1
|
||||
sent_msg = agent.send.call_args.args[0]
|
||||
@@ -115,7 +115,7 @@ async def test_receive_loop_routing_success(agent):
|
||||
agent._send_to_gesture_agent.assert_awaited_once_with("Hello Gesture")
|
||||
|
||||
# Override (since we mapped it to a goal)
|
||||
agent._send_to_bdi_belief.assert_awaited_once_with("some_goal_slug")
|
||||
agent._send_to_bdi_belief.assert_awaited_once_with("some_goal_slug", "goal")
|
||||
|
||||
assert agent._send_to_speech_agent.await_count == 1
|
||||
assert agent._send_to_gesture_agent.await_count == 1
|
||||
|
||||
@@ -11,6 +11,5 @@ def test_router_includes_expected_paths():
|
||||
# Ensure at least one route under each prefix exists
|
||||
assert any(p.startswith("/robot") for p in paths)
|
||||
assert any(p.startswith("/message") for p in paths)
|
||||
assert any(p.startswith("/sse") for p in paths)
|
||||
assert any(p.startswith("/logs") for p in paths)
|
||||
assert any(p.startswith("/program") for p in paths)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import pytest
|
||||
from fastapi import FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from control_backend.api.v1.endpoints import sse
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
app = FastAPI()
|
||||
app.include_router(sse.router)
|
||||
return app
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client(app):
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
def test_sse_route_exists(client):
|
||||
"""Minimal smoke test to ensure /sse route exists and responds."""
|
||||
response = client.get("/sse")
|
||||
# Since implementation is not done, we only assert it doesn't crash
|
||||
assert response.status_code == 200
|
||||
Reference in New Issue
Block a user