Skip to content

fix: Missing database tables in test fixtures (#264)#281

Open
anchapin wants to merge 1 commit intomainfrom
fix/test-fixtures-missing-tables-264
Open

fix: Missing database tables in test fixtures (#264)#281
anchapin wants to merge 1 commit intomainfrom
fix/test-fixtures-missing-tables-264

Conversation

@anchapin
Copy link
Copy Markdown
Owner

@anchapin anchapin commented Mar 7, 2026

Summary

This PR fixes the failing tests due to missing database tables in test fixtures:

  • test_performance_improvements.py::TestQuotaManager::test_check_task_quota - failed with 'no such table: quota_usage'
  • test_performance_improvements.py::TestQuotaManager::test_increment_task_count - failed with 'no such table: quota_usage'
  • test_marketplace_dedup.py::TestBidLockManager::test_lock_context_manager - was passing but fixed for consistency

Changes

Modified :

  • Added import for (as )
  • Updated the fixture to create tables from both and
  • This ensures all tables including are created in the in-memory test database

Testing

All three tests now pass:

Closes #264

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @anchapin, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

- Import user_models.UserBase in test_performance_improvements.py
- Create all tables from both Base and UserBase in test_db fixture
- This fixes tests that failed with 'no such table: quota_usage'

Fixes #264
@anchapin anchapin force-pushed the fix/test-fixtures-missing-tables-264 branch from 0b75a45 to 7f3e543 Compare March 8, 2026 05:37
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.

Fix test fixtures: Missing database tables (quota_usage, bid_locks)

2 participants