Refactor tests and add comprehensive coverage for User, VerificationCode, Category, Product, StockReservation, Cart, Order, and related models

- Enhanced User model tests with creation, registration status, password hashing, and unique username checks.
- Added extensive tests for VerificationCode model including creation, uniqueness, and relation to User.
- Implemented Category model tests covering creation, uniqueness, and string representation.
- Expanded Product model tests to include creation, default values, VAT calculations, and deletion behavior.
- Introduced StockReservation and StockReservationItem model tests for creation, status checks, and unique constraints.
- Developed Cart and CartItem model tests focusing on creation, total calculations, and item uniqueness.
- Added Order and OrderItem model tests for creation, status management, and string representation.
- Included SavedPaymentMethod and ShippingAddress model tests for creation, default settings, and ordering.
This commit is contained in:
2026-04-20 09:38:54 +02:00
parent 8f70125d3a
commit 3e76782a0c
2 changed files with 1246 additions and 103 deletions
+1236 -93
View File
File diff suppressed because it is too large Load Diff