From 3e76782a0cb4f1bccceb854bd4c5388aa8e4afec Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 20 Apr 2026 09:38:54 +0200 Subject: [PATCH] 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. --- .../0006_alter_category_name.cpython-314.pyc | Bin 0 -> 806 bytes tienda/tests.py | 1349 +++++++++++++++-- 2 files changed, 1246 insertions(+), 103 deletions(-) create mode 100644 tienda/migrations/__pycache__/0006_alter_category_name.cpython-314.pyc diff --git a/tienda/migrations/__pycache__/0006_alter_category_name.cpython-314.pyc b/tienda/migrations/__pycache__/0006_alter_category_name.cpython-314.pyc new file mode 100644 index 0000000000000000000000000000000000000000..808b8e4abdc3dee802cac6910dbf1cab9772baa9 GIT binary patch literal 806 zcmZuvPm9w)9GywpX%f3yt4mc}WY=Db*z}<8LGcfQtfEVaUc19=GHoMi(w$7j-g*$P z`Z4qa2z~^wE<($A5>MU=UG(a2l9qaKAd~kp^WOa4FLUkmhJ#>y`u-z)hY|Xz$!Zjr zU~wP71RWp`KSq04;ypteSI{QfMxIeap4q`|vJ$P|H_RMM(<@v>jp8p&8-{WQVNWm_ zCUL6BAPIPs`fC+J_L3|j029>Bx+SKM6|2Y$9kq~n#KL|fU;Rk0iLDENr>K|*B6q0=JV-rv`^kX20gJ)QZHr{geVL^0aEY#W!G zp3GhUO&2oWqD)soSIx_!HHTxNFGx0Nklu#rEt(T#H|M5to=l$39b})IT3g4~)~vQY zJ6oGoFHEaD$JLz={^$C)>b;Xv!FJ{*sggHO#Ko1{exso5;3bQDNi#Ui8j*$1&(oRm sy_Wzf>rUR@yW%oXxb7&`U~XcJ{}6;5C!~zYduLjyf34JiBOsajFFCHveE