Skip to content

Fix federation signal test lint errors - #327

Merged
lucaspar merged 1 commit into
masterfrom
cursor/continuous-integration-failures-b922
Jul 27, 2026
Merged

Fix federation signal test lint errors#327
lucaspar merged 1 commit into
masterfrom
cursor/continuous-integration-failures-b922

Conversation

@cursor

@cursor cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • Stop injecting unused publish_federation_event mock parameters in two federation signal tests.
  • Keep the publish hook patched with MagicMock() so the tests still avoid publish side effects.

Verification

  • uv run --dev prek run ruff-check --all-files (from sdk/)
  • uvx ruff check --config /workspace/gateway/pyproject.toml /workspace/gateway/sds_gateway/api_methods/tests/test_federation_signals.py

Note: uv run --extra local prek run ruff-check --all-files from gateway/ could not complete locally because this runner lacks pg_config for building psycopg-c; direct Ruff validation with the gateway config passed.

Open in Web View Automation 

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_event mocks into test methods that never use them.

In test_deleted_capture_reindexes_with_is_deleted and test_disconnect_captures_reindexes_orphans, the @patch for publish_federation_event now uses new=MagicMock() so publish stays stubbed and side-effect-free, while the unused _mock_publish fixture parameters are removed.

Reviewed by Cursor Bugbot for commit a1922aa. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Lucas Parzianello <lucaspar@users.noreply.github.com>
@semanticdiff-com

semanticdiff-com Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  gateway/sds_gateway/api_methods/tests/test_federation_signals.py  67% smaller

@lucaspar
lucaspar marked this pull request as ready for review July 27, 2026 16:57
@lucaspar
lucaspar merged commit dcd0525 into master Jul 27, 2026
@lucaspar
lucaspar deleted the cursor/continuous-integration-failures-b922 branch July 27, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants