forked from Rockachopa/Timmy-time-dashboard
Fix input validation for chat and memory routes (#155)
This commit is contained in:
committed by
GitHub
parent
82fb2417e3
commit
fe484ad7b6
@@ -20,9 +20,8 @@ def test_agents_chat_empty_message_validation(client):
|
||||
data={"message": ""},
|
||||
headers={"X-CSRF-Token": csrf_token} if csrf_token else {},
|
||||
)
|
||||
# Empty message should either be rejected or handled gracefully
|
||||
# For now, we'll accept it but it should be logged
|
||||
assert response.status_code in [200, 422]
|
||||
# Empty message should be rejected
|
||||
assert response.status_code in [400, 422]
|
||||
|
||||
|
||||
def test_agents_chat_oversized_message_validation(client):
|
||||
@@ -53,7 +52,7 @@ def test_memory_search_empty_query_validation(client):
|
||||
data={"query": ""},
|
||||
headers={"X-CSRF-Token": csrf_token} if csrf_token else {},
|
||||
)
|
||||
assert response.status_code in [200, 422, 500] # 500 for missing template
|
||||
assert response.status_code in [400, 422, 500] # 500 for missing template
|
||||
|
||||
|
||||
def test_memory_search_oversized_query_validation(client):
|
||||
|
||||
Reference in New Issue
Block a user