Strengthen the connector tests with JSONPath edge cases.
Where: server/test_chatbot_connector.py (these run with plain python3, no deps).
Add cases for jsonpath_get:
- Bracketed indices:
$.a[0].b and out-of-range indices return None.
- Missing keys return
None (no exception).
- Non-string leaves (dict/list) handled by
extract_reply_text (JSON-serialised).
- Empty /
None path returns None.
Acceptance:
- New
test_* functions pass via python3 server/test_chatbot_connector.py.
Strengthen the connector tests with JSONPath edge cases.
Where:
server/test_chatbot_connector.py(these run with plainpython3, no deps).Add cases for
jsonpath_get:$.a[0].band out-of-range indices returnNone.None(no exception).extract_reply_text(JSON-serialised).Nonepath returnsNone.Acceptance:
test_*functions pass viapython3 server/test_chatbot_connector.py.