def test_find_open_cart_for_user(customer_user, opened_user_cart): assert find_open_cart_for_user(customer_user) == opened_user_cart cart = Cart.objects.create(user=customer_user) assert find_open_cart_for_user(customer_user) == cart assert (Cart.objects.get( pk=opened_user_cart.pk).status == CartStatus.CANCELED)
def test_find_open_cart_for_user(customer_user, opened_user_cart): assert find_open_cart_for_user(customer_user) == opened_user_cart cart = Cart.objects.create(user=customer_user) assert find_open_cart_for_user(customer_user) == cart assert ( Cart.objects.get(pk=opened_user_cart.pk).status == CartStatus.CANCELED)