feat: improved order payment lifecycle
This commit is contained in:
@@ -4,14 +4,23 @@ from django.contrib.auth.models import User
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
|
||||
from shop.models import Cart, CartItem, Order, CustomerAddress, ShippingMethod, ShopSettings
|
||||
from shop.models import (
|
||||
Cart,
|
||||
CartItem,
|
||||
Order,
|
||||
CustomerAddress,
|
||||
ShippingMethod,
|
||||
ShopSettings,
|
||||
)
|
||||
from shop.tests.mixins import CreateProductsMixin
|
||||
|
||||
|
||||
class TestOrders(TestCase, CreateProductsMixin):
|
||||
def setUp(self):
|
||||
self.product = self.create_product()
|
||||
self.user = User.objects.create_user("anakin", "anakin@skywalker.com", "ihatesand")
|
||||
self.user = User.objects.create_user(
|
||||
"anakin", "anakin@skywalker.com", "ihatesand"
|
||||
)
|
||||
self.cart_for_user = self.create_cart(user=self.user)
|
||||
self.anonymous_cart = self.create_cart()
|
||||
self.address = CustomerAddress.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user