Some checks failed
Consolidate User.role (2-value: admin/store) + User.is_super_admin (boolean) into a single 4-value UserRole enum: super_admin, platform_admin, merchant_owner, store_member. Drop stale StoreUser.user_type column. Fix role="user" bug in merchant creation. Key changes: - Expand UserRole enum from 2 to 4 values with computed properties (is_admin, is_super_admin, is_platform_admin, is_merchant_owner, is_store_user) - Add Alembic migration (tenancy_003) for data migration + column drops - Remove is_super_admin from JWT token payload - Update all auth dependencies, services, routes, templates, JS, and tests - Update all RBAC documentation 66 files changed, 1219 unit tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Store API Integration Tests
Documentation
For comprehensive store API testing documentation, please see:
Store API Testing Guide in MkDocs
Quick Start
# Run all store tests
pytest tests/integration/api/v1/store/ -v
# Run with coverage
pytest tests/integration/api/v1/store/ \
--cov=app/api/v1/store \
--cov-report=html
Test Files
test_authentication.py- Authentication tests (30+ tests)test_dashboard.py- Dashboard stats tests (12 tests)
Fixtures
Key fixtures for store testing:
store_user_headers- Authentication headers for store APItest_store_with_store_user- Store with StoreUser association
See Also
- Store API Testing Guide - Full documentation
- Test Structure - Overall test organization