Commit f4df13a
committed
feat: Add database configuration for integration tests
Add DATABASES and required Django apps to test_settings.py to support
integration tests that use real ORM operations (wallet lifecycle tests).
This change is necessary because:
- Wallet tests verify model lifecycle (PENDING → ACTIVE → ERASED)
- Tests verify ForeignKey relationships between Payment and Wallet
- Tests verify database-level behavior (refresh_from_db, transactions)
- Mock-based tests would not catch integration issues
Following the pattern from testapp/settings.py, we use:
- In-memory SQLite for speed
- django.contrib.contenttypes (required for ForeignKey)
- django.contrib.auth (common Django dependency)
This is consistent with the pre-existing test structure where testapp
provides real models for integration testing.1 parent 2dacfb0 commit f4df13a
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments