🐛 fix(tests): fix DI container setup, mock signature, and update deps#81
🐛 fix(tests): fix DI container setup, mock signature, and update deps#81itisnotyourenv wants to merge 2 commits into
Conversation
- Remove invalid `worker_postgres_config` arg from `DBProvider()` in test conftest — it was interpreted as Dishka's `scope` parameter, causing UnknownScopeError in all integration tests. - Add `component` positional parameter to mock container's `get()` to match Dishka's `AsyncContainer.get(dep_type, component)` signature. - Update uv.lock with latest dependency versions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review —
|
Pull Request
Description
Fixes two test failures introduced/exposed by the DI provider refactor in #79, and updates project dependencies.
Type of Change
Changes
Test Fixes
tests/integration/conftest.py: Removed invalidworker_postgres_configargument fromDBProvider()— it was being passed as Dishka'sscopeparameter, causingUnknownScopeErrorin all 9 integration tests. The worker-specific config is already passed viacontext={Config: worker_config}.tests/unit/presentation/bot/routers/test_commands.py: Addedcomponentpositional parameter to mock container'sget()method to match Dishka'sAsyncContainer.get(dep_type, component)signature.Dependency Updates
uv.lockwith latest dependency versions.Testing
Code Quality
ruff check src/ tests/)ruff format src/ tests/ --check)Related Issues
Follows up on #79
🤖 Generated with Claude Code