Auto: test/integration-suite #6

Merged
claude-bot merged 13 commits from test/integration-suite into main 2026-02-25 23:19:11 -07:00
Collaborator

Automated PR for branch test/integration-suite.

Automated PR for branch `test/integration-suite`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 6 integration tests covering secret token validation for /webhook
and /feedback_webhook endpoints (no-secret, wrong-secret, correct-secret).
Update root conftest to prefer real httpx when installed (needed for
ASGITransport) and add uvicorn stub.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test: fix lint errors and remove duplicate pytest.ini
All checks were successful
Auto PR Review / review (push) Successful in 2m8s
d1974fecce
Remove unused imports flagged by ruff and consolidate pytest
config into pyproject.toml only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Collaborator

Approved

Well-structured addition of integration and smoke tests. The test fixtures correctly target verified module attributes (DatabaseManager._instance, _feedback_pending_users, user_manager.sessions). Mock builders faithfully reproduce Telegram API objects. Webhook security, admin auth, translation pipeline, subscription flow, feedback, and YouTube summarization are all covered with proper isolation. No critical or warning-level issues found.

Suggestions

  • tests/integration/test_feedback_flow.py: Inconsistent use of @pytest.mark.asyncio: test_feedback_flow.py applies it to every test while all other integration test files omit it. With asyncio_mode = "auto" in pyproject.toml, the decorator is redundant. Consider removing it from test_feedback_flow.py for consistency.
  • tests/integration/test_health.py: _get_real_httpx() is now unnecessary. The root conftest.py was updated to preserve the real httpx when installed (try/except pattern at line 62). Since integration tests require httpx to be installed, sys.modules['httpx'] will already be the real module. This function adds complexity for no benefit in the current setup.
  • tests/integration/conftest.py: The tmp_db fixture resets DatabaseManager._instance = None but doesn't explicitly close the old singleton's SQLite connection before discarding it. While not a real problem in tests (connections are to tmp files that get cleaned up), adding db_manager.close() or similar cleanup before resetting would be more thorough.
## Approved Well-structured addition of integration and smoke tests. The test fixtures correctly target verified module attributes (DatabaseManager._instance, _feedback_pending_users, user_manager.sessions). Mock builders faithfully reproduce Telegram API objects. Webhook security, admin auth, translation pipeline, subscription flow, feedback, and YouTube summarization are all covered with proper isolation. No critical or warning-level issues found. ### Suggestions - **tests/integration/test_feedback_flow.py**: Inconsistent use of @pytest.mark.asyncio: test_feedback_flow.py applies it to every test while all other integration test files omit it. With asyncio_mode = "auto" in pyproject.toml, the decorator is redundant. Consider removing it from test_feedback_flow.py for consistency. - **tests/integration/test_health.py**: _get_real_httpx() is now unnecessary. The root conftest.py was updated to preserve the real httpx when installed (try/except pattern at line 62). Since integration tests require httpx to be installed, sys.modules['httpx'] will already be the real module. This function adds complexity for no benefit in the current setup. - **tests/integration/conftest.py**: The tmp_db fixture resets DatabaseManager._instance = None but doesn't explicitly close the old singleton's SQLite connection before discarding it. While not a real problem in tests (connections are to tmp files that get cleaned up), adding db_manager.close() or similar cleanup before resetting would be more thorough.
claude-bot deleted branch test/integration-suite 2026-02-25 23:19:11 -07:00
claude-bot referenced this pull request from a commit 2026-02-25 23:19:13 -07:00
bittabola referenced this pull request from a commit 2026-02-25 23:25:20 -07:00
bittabola referenced this pull request from a commit 2026-02-25 23:29:42 -07:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bittabola/tarjimon!6
No description provided.