Skip to content

Add JSONPath edge-case tests to the connector test suite #4

@prat3ik

Description

@prat3ik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions