test: cover get_dd_changelog and signal_analytics MCP tools - #39
Open
721AndrewWang wants to merge 1 commit into
Open
721AndrewWang wants to merge 1 commit into
721AndrewWang wants to merge 1 commit into
Conversation
Both tools had no test references. Add mock-backed unit tests that pin the Cypher parameter contract, query routing, result shaping, error handling, and markdown formatting. No source changes. - tests/tools/test_dd_changelog.py: VersionTool.get_dd_changelog and format_dd_changelog_report (15 tests) - tests/llm/test_signal_analytics.py: _signal_analytics, its two query shapes, and _format_analytics (33 tests) The unknown-filter-key test pins the current behaviour (keys are silently dropped, unlike group_by which is validated) so that a deliberate change shows up in review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #38.
Adds unit tests for two MCP tools that had no test references,
get_dd_changelogandsignal_analytics. No source changes.tests/tools/test_dd_changelog.py(15 tests):VersionTool.get_dd_changelogparameter contract, result shaping and error path;format_dd_changelog_reportheader, version-range labels, rows and truncation hint.tests/llm/test_signal_analytics.py(33 tests):group_byvalidation, routing between the plain query and theCHECKED_WITHjoin,check_statusanderror_typefilters, parameterisation, error handling and_format_analytics.All tests run in the default marker tier against a mocked
GraphClient, no Neo4j needed.One test pins a behaviour rather than a decision: unknown
filterskeys are currently dropped silently while unknowngroup_byvalues are rejected. If you would rather havefilterserror too, I can change the tool and flip that test here.Verified locally against this branch (upstream
mainat b0d769b) and against Simon-McIntosh/imas-codexmainat 7745119: