Skip to content

test(backend): block unmocked Slack SDK calls - #104

Merged
johnnyhuy merged 1 commit into
mainfrom
ao/wingman-development-21/agent/issue-103-offline-slack-guard
Dec 4, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
ao/wingman-development-21/agent/issue-103-offline-slack-guard

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Install a pytest guard before backend test collection so unmocked Slack Web API calls and built-in Socket Mode connections fail locally. Existing per-test mocks still work, and two regression tests verify the guard stops both paths before transport.

Closes #103

Standalone follow-up to #102. No user-facing change.

  • mise run install passed.
  • mise run test-backend passed with 335 tests.
  • mise run test-frontend passed with 58 tests.

The local gates ran in an isolated source archive with UV_OFFLINE=1. All Slack verification used fixtures and mocks.

tests/test_slack_test_isolation.py::test_unmocked_slack_auth_is_blocked PASSED
tests/test_slack_test_isolation.py::test_unmocked_slack_socket_mode_is_blocked PASSED
335 passed, 1069 warnings in 6.67s

A temporary pytest --collect-only probe called WebClient.auth_test() at import time. It exited with code 2 and reported Slack Web API calls must be mocked in backend tests. The mock HTTP transport was never reached. Running the two regression tests with --noconftest made both fail at their mocked transport sentinels, confirming they detect a missing guard.

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy merged commit a4058ad into main Dec 4, 2026
10 checks passed
@johnnyhuy
johnnyhuy deleted the ao/wingman-development-21/agent/issue-103-offline-slack-guard branch December 4, 2026 06:18
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.

Block unmocked Slack SDK calls in backend pytest

1 participant