Fix federation signal test lint errors - #327
Merged
Merged
Conversation
Co-authored-by: Lucas Parzianello <lucaspar@users.noreply.github.com>
Changed Files
|
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.
Summary
publish_federation_eventmock parameters in two federation signal tests.MagicMock()so the tests still avoid publish side effects.Verification
uv run --dev prek run ruff-check --all-files(fromsdk/)uvx ruff check --config /workspace/gateway/pyproject.toml /workspace/gateway/sds_gateway/api_methods/tests/test_federation_signals.pyNote:
uv run --extra local prek run ruff-check --all-filesfromgateway/could not complete locally because this runner lackspg_configfor buildingpsycopg-c; direct Ruff validation with the gateway config passed.Note
Low Risk
Test-only mock wiring; no production federation or reindex behavior changes.
Overview
Fixes Ruff/lint complaints in two federation signal tests by no longer passing
publish_federation_eventmocks into test methods that never use them.In
test_deleted_capture_reindexes_with_is_deletedandtest_disconnect_captures_reindexes_orphans, the@patchforpublish_federation_eventnow usesnew=MagicMock()so publish stays stubbed and side-effect-free, while the unused_mock_publishfixture parameters are removed.Reviewed by Cursor Bugbot for commit a1922aa. Bugbot is set up for automated code reviews on this repo. Configure here.