Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add order fixture
Krzysztof Wolski964a7a1de924
diff --git a/tests/conftest.py b/tests/conftest.pyindex 66bb18b143..980196ba65 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -9,6 +9,7 @@ from saleor.cart import decoratorsfrom saleor.cart.models import Cartfrom saleor.checkout.core import Checkoutfrom saleor.discount.models import Voucher+from saleor.order.models import Orderfrom saleor.product.models import Product, ProductVariant, Stockfrom saleor.shipping.models import ShippingMethodfrom saleor.userprofile.models import Address, User@@ -40,6 +41,11 @@ def request_cart_with_item(product_in_stock, request_cart):return request_cart+def order(billing_address):+ return Order.objects.create(billing_address=billing_address)++@pytest.fixture()def admin_user(db): # pylint: disable=W0613"""A Django admin user.