File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,35 +100,6 @@ async def test_chat_whitespace_message(client):
100100 assert data ["action_type" ] == "error"
101101
102102
103- @pytest .mark .asyncio
104- async def test_chat_null_message (client ):
105- """Test chat endpoint handles null message without crashing."""
106- response = await client .post (
107- "/api/chat" ,
108- json = {"conversation_id" : "test-conv" , "message" : None }
109- )
110-
111- assert response .status_code == 400
112- data = await response .get_json ()
113- assert data ["action_type" ] == "error"
114- assert "empty" in data ["message" ].lower ()
115-
116-
117- @pytest .mark .asyncio
118- async def test_chat_invalid_json_body (client ):
119- """Test chat endpoint rejects invalid JSON body with 400."""
120- response = await client .post (
121- "/api/chat" ,
122- data = "not valid json" ,
123- headers = {"Content-Type" : "application/json" }
124- )
125-
126- assert response .status_code == 400
127- data = await response .get_json ()
128- assert data ["action_type" ] == "error"
129- assert "required" in data ["message" ].lower ()
130-
131-
132103@pytest .mark .asyncio
133104async def test_chat_empty_message_with_action_allowed (client ):
134105 """Test chat endpoint allows empty message when action is specified."""
You can’t perform that action at this time.
0 commit comments