repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
saleor
saleor/tests/e2e/orders/zero_total/test_0_total_order_with_100_percent_manual_discount.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...orders.utils import ( draft_order_complete, draft_order_create, draft_order_update, order_discount_add, order_lines_create, ) from ...product.utils.preparing_product import prepare_products from ...shop.utils.preparing_shop import prepare_defaul...
186
7,313
saleor
saleor/tests/e2e/orders/zero_total/test_0_total_order_for_lines_with_price_0.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...orders.utils import ( draft_order_complete, draft_order_create, draft_order_update, order_lines_create, ) from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_default_shop from ...utils impo...
96
2,990
saleor
saleor/tests/e2e/orders/taxes/test_order_calculate_simple_taxes_product_tax_class.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils import update_product from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_permissions from ..utils import ...
153
4,932
saleor
saleor/tests/e2e/orders/taxes/test_order_calculate_simple_taxes_product_type_tax_class.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, create_product_variant_channel_listing, update_product_type, ) from ...shop.utils.preparing_shop import ...
215
6,556
saleor
saleor/tests/e2e/orders/taxes/test_order_calculate_simple_taxes_based_on_shipping_address.py
.py
import pytest from ... import ADDRESS_DE from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_permissions from ..utils import ( draft_order_complete, draft_order_creat...
184
6,132
saleor
saleor/tests/e2e/orders/taxes/test_order_calculate_simple_taxes_based_on_shipping_tax_class.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shipping_zone.utils import update_shipping_price from ...shop.utils import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_permissions from ..utils import ( ...
176
5,814
saleor
saleor/tests/e2e/orders/taxes/test_draft_order_complete_return_tax_error.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...apps.utils import add_app from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_default_shop from ...taxes.utils import get_tax_configurations, update_tax_configuration from ...utils import assign_permission...
135
5,560
saleor
saleor/tests/e2e/orders/utils/draft_order_delete.py
.py
from saleor.graphql.tests.utils import get_graphql_content DRAFT_ORDER_DELETE_MUTATION = """ mutation DraftOrderDelete($id: ID!) { draftOrderDelete(id: $id) { errors { message field } order { status } } } """ def draft_order_delete(api_client, id): variables = {"id": id} resp...
33
586
saleor
saleor/tests/e2e/orders/utils/order_create_from_checkout.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_CREATE_FROM_CHECKOUT_MUTATION = """ mutation orderCreateFromCheckout($id: ID!) { orderCreateFromCheckout(id: $id) { errors { message field code } order { id created status paymentStatus ...
86
1,738
saleor
saleor/tests/e2e/orders/utils/order_update_shipping.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_UPDATE_SHIPPING_MUTATION = """ mutation OrderUpdateShipping($input: OrderUpdateShippingInput!, $id: ID!) { orderUpdateShipping(input: $input, order: $id) { errors { message field code } order { id subtotal { ...
97
1,651
saleor
saleor/tests/e2e/orders/utils/order_lines_create.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_LINES_CREATE_MUTATION = """ mutation orderLinesCreate($id: ID!, $input: [OrderLineCreateInput!]!) { orderLinesCreate(id: $id, input: $input) { order { id shippingMethods { id price { amount } } ...
106
1,826
saleor
saleor/tests/e2e/orders/utils/order_fulfill_add_tracking.py
.py
from ...utils import get_graphql_content ORDER_FULFILLMENT_UPDATE_TRACKING = """ mutation OrderFulfillmentUpdateTracking( $id: ID! $input: FulfillmentUpdateTrackingInput! ) { orderFulfillmentUpdateTracking(id: $id, input: $input) { errors { message code field } order { id ...
51
998
saleor
saleor/tests/e2e/orders/utils/order_line_delete.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_LINE_DELETE_MUTATION = """ mutation orderLineDelete($lineId: ID!) { orderLineDelete(id: $lineId) { order { id shippingMethods { id price { amount } } total { ...BaseTaxedMoney ...
85
1,413
saleor
saleor/tests/e2e/orders/utils/draft_order_bulk_delete.py
.py
from saleor.graphql.tests.utils import get_graphql_content DRAFT_ORDER_BULK_DELETE_MUTATION = """ mutation DraftBulkDelete($ids: [ID!]!) { draftOrderBulkDelete(ids: $ids) { errors { field code message } count } } """ def draft_order_bulk_delete(api_client, ids_list): variables =...
29
570
saleor
saleor/tests/e2e/orders/utils/order_fulfill.py
.py
from ...utils import get_graphql_content ORDER_FULFILL_MUTATION = """ mutation orderFulfill ($order: ID!, $input: OrderFulfillInput!) { orderFulfill(order: $order, input: $input) { order { status fulfillments { id status created } id } fulfillments { ...
50
813
saleor
saleor/tests/e2e/orders/utils/order_bulk_create.py
.py
from saleor.graphql.tests.utils import get_graphql_content from .fragments import ORDER_LINE_FRAGMENT ORDER_BULK_CREATE_MUTATION = ( """ mutation OrderBulkCreate( $orders: [OrderBulkCreateInput!]!, $errorPolicy: ErrorPolicyEnum, $stockUpdatePolicy: StockUpdatePolicyEnum ) { orderBulkCreate( ...
204
5,148
saleor
saleor/tests/e2e/orders/utils/order_fulfillment_cancel.py
.py
from ...utils import get_graphql_content ORDER_FULFILLMENT_CANCEL_MUTATION = """ mutation OrderFulfillmentCancel($id: ID!, $input: FulfillmentCancelInput!) { orderFulfillmentCancel(id: $id, input: $input) { errors { message field code } order { id status fulfillments {...
45
860
saleor
saleor/tests/e2e/orders/utils/fragments.py
.py
ORDER_LINE_FRAGMENT = """ fragment OrderLine on OrderLine { id variant { id } productName productSku variantName translatedVariantName translatedProductName productVariantId isShippingRequired isGift quantity quantityFulfilled unitPrice { gross { ...
77
1,141
saleor
saleor/tests/e2e/orders/utils/order_update.py
.py
from ...account.utils.fragments import ADDRESS_FRAGMENT from ...utils import get_graphql_content ORDER_UPDATE_MUTATION = ( """ mutation orderUpdate( $id: ID $externalReference: String $input: OrderUpdateInput! ) { orderUpdate( id: $id externalReferenc...
62
1,299
saleor
saleor/tests/e2e/orders/utils/__init__.py
.py
from .draft_order_bulk_delete import draft_order_bulk_delete from .draft_order_complete import draft_order_complete, raw_draft_order_complete from .draft_order_create import draft_order_create from .draft_order_delete import draft_order_delete from .draft_order_update import draft_order_update, raw_draft_order_update f...
57
2,042
saleor
saleor/tests/e2e/orders/utils/draft_order_create.py
.py
from saleor.graphql.tests.utils import get_graphql_content DRAFT_ORDER_CREATE_MUTATION = """ mutation OrderDraftCreate($input: DraftOrderCreateInput!) { draftOrderCreate(input: $input) { errors { message field code } order { id created status user { id ...
107
1,799
saleor
saleor/tests/e2e/orders/utils/order_mark_as_paid.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_MARK_AS_PAID_MUTATION = """ mutation OrderMarkAsPaid($id: ID!, $transactionReference: String) { orderMarkAsPaid(id: $id, transactionReference: $transactionReference) { order { id isPaid paymentStatus payments { ...
61
1,135
saleor
saleor/tests/e2e/orders/utils/draft_order_complete.py
.py
from ...account.utils.fragments import ADDRESS_FRAGMENT from ...utils import get_graphql_content DRAFT_ORDER_COMPLETE_MUTATION = ( """ mutation DraftOrderComplete($id: ID!) { draftOrderComplete(id: $id) { errors { message field code } order { id user { id ...
136
2,267
saleor
saleor/tests/e2e/orders/utils/order_by_checkout_id_query.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_BY_CHECKOUT_ID_QUERY = """ query OrderByCheckoutIdDetails($checkout_id: ID!) { orders(first:1, filter: {checkoutIds: [$checkout_id]}) { totalCount edges { node { chargeStatus authorizeStatus paymentStatus i...
79
1,493
saleor
saleor/tests/e2e/orders/utils/order_void.py
.py
from ...utils import get_graphql_content ORDER_VOID_MUTATION = """ mutation VoidOrder ($id:ID!){ orderVoid(id: $id) { errors { code field message } order { id status payments { id } statusDisplay events { type } } } } """ ...
57
852
saleor
saleor/tests/e2e/orders/utils/draft_order_update.py
.py
from saleor.graphql.tests.utils import get_graphql_content DRAFT_ORDER_UPDATE_MUTATION = """ mutation DraftOrderUpdate($input: DraftOrderInput!, $id: ID!) { draftOrderUpdate(input: $input, id: $id) { errors { message field code } order { id lines { id undisco...
175
3,073
saleor
saleor/tests/e2e/orders/utils/order_line_update.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_LINE_UPDATE_MUTATION = """ mutation orderLineUpdate($id: ID!, $input: OrderLineInput!) { orderLineUpdate(id: $id, input: $input) { order { id shippingMethods { id price { amount } } total { ...
94
1,566
saleor
saleor/tests/e2e/orders/utils/order_line_discount_update.py
.py
from .....graphql.tests.utils import get_graphql_content ORDER_LINE_DISCOUNT_UPDATE = """ mutation OrderLineDiscountUpdate($input: OrderDiscountCommonInput!, $orderLineId: ID!){ orderLineDiscountUpdate(orderLineId: $orderLineId, input: $input){ order { id voucherCode voucher { id ...
85
1,650
saleor
saleor/tests/e2e/orders/utils/order_cancel.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_CANCEL_MUTATION = """ mutation OrderCancel($id: ID!) { orderCancel(id: $id) { errors { message field } order { id status paymentStatus isPaid totalBalance { amount } total { ...
43
729
saleor
saleor/tests/e2e/orders/utils/order_discount_add.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_DISCOUNT_ADD_MUTATION = """ mutation OrderDiscountAdd($input: OrderDiscountCommonInput!, $id: ID!) { orderDiscountAdd(input: $input, orderId: $id) { errors { message field } order { errors { message field ...
113
1,943
saleor
saleor/tests/e2e/orders/utils/order_discount_delete.py
.py
from saleor.graphql.tests.utils import get_graphql_content ORDER_DISCOUNT_DELETE_MUTATION = """ mutation OrderDiscountDelete($discountId: ID!){ orderDiscountDelete(discountId: $discountId){ errors { message field } order { errors { message field } id to...
95
1,625
saleor
saleor/tests/e2e/orders/utils/order_query.py
.py
from ...account.utils.fragments import ADDRESS_FRAGMENT from ...utils import get_graphql_content from .fragments import ORDER_LINE_FRAGMENT ORDER_QUERY = ( """ query OrderDetails($id: ID!) { order(id: $id) { paymentStatus authorizeStatus chargeStatus isPaid payments { id gateway ...
113
1,626
saleor
saleor/tests/e2e/orders/utils/order_invoice_create.py
.py
from ...utils import get_graphql_content ORDER_INVOICE_CREATE_MUTATION = """ mutation InvoiceCreate($id: ID!, $input: InvoiceCreateInput!){ invoiceCreate(orderId: $id, input: $input, ) { errors { code field message } invoice { number url createdAt metadata{ ...
49
833
saleor
saleor/tests/e2e/orders/discounts/test_order_products_from_the_same_category_on_fixed_promotion.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, create_product_variant_channel...
265
8,892
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_usage_includes_draft_orders.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...utils import assign_permissions from ...vouchers.utils import ( create_voucher, create_voucher_channel_listing, get_voucher, ) from ..ut...
155
5,086
saleor
saleor/tests/e2e/orders/discounts/test_gift_promotion_applied_on_draft_order.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_promotion_rule from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_perm...
228
7,887
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_is_released_when_draft_order_is_deleted.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...utils import assign_permissions from ...vouchers.utils import ( create_voucher, create_voucher_channel_listing, get_voucher, ) from ..ut...
135
4,031
saleor
saleor/tests/e2e/orders/discounts/test_manual_total_discount_applied_on_draft_order.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_permissions from ..utils import ( draft_order_complete, draft_order_...
407
13,832
saleor
saleor/tests/e2e/orders/discounts/test_apply_better_promotion_to_product.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils import get_product from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_promotion_rule from ...shop.utils....
166
5,363
saleor
saleor/tests/e2e/orders/discounts/test_order_products_on_catalog_promotion_and_voucher_entire.py
.py
from decimal import Decimal import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, c...
554
19,122
saleor
saleor/tests/e2e/orders/discounts/test_order_promotion_not_applied_when_not_within_time_range.py
.py
import datetime import pytest from django.utils import timezone from freezegun import freeze_time from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils import get_product from ...product.utils.preparing_product import prepare_product from ....
125
4,447
saleor
saleor/tests/e2e/orders/discounts/test_order_product_with_percentage_promotion.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_promotion_rule from ...shop.utils.preparing_shop import prepare_default_sho...
141
5,675
saleor
saleor/tests/e2e/orders/discounts/test_order_promotion_still_applied_to_the_order_when_promotion_is_removed.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...product.utils.product_query import get_product from ...promotions.utils import ( create_promotion, create_promotion_...
164
6,536
saleor
saleor/tests/e2e/orders/discounts/test_order_products_on_fixed_sale.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...sales.utils import create_sale, create_sale_channel_listing, sale_catalogues_add from ...shop.utils.preparing_shop import pr...
155
4,725
saleor
saleor/tests/e2e/orders/discounts/test_manual_order_discount_and_voucher.py
.py
from decimal import Decimal import pytest from .....core.prices import quantize_price from .....discount import DiscountType, DiscountValueType from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils impor...
308
12,391
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_specific_product_cheapest_product.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assig...
277
9,840
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_entire_order_cheapest_product.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assig...
273
9,742
saleor
saleor/tests/e2e/orders/discounts/test_promotion_applied_on_draft_order_with_specific_total.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_promotion_rule from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_perm...
246
8,385
saleor
saleor/tests/e2e/orders/discounts/test_order_with_shipping_voucher_and_manual_order_discount.py
.py
from decimal import Decimal import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_default_shop from ...utils import assign_permissions from ...vouchers.utils import create_voucher, create_voucher_channel_listing fr...
178
6,220
saleor
saleor/tests/e2e/orders/discounts/test_promotion_applied_on_draft_order_with_specific_subtotal.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_promotion_rule from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assign_perm...
259
8,635
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_specific_product_and_manual_line_discount.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assig...
332
12,272
saleor
saleor/tests/e2e/orders/discounts/test_order_products_on_catalog_promotion_and_order_promotion.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, create_product_variant_channel...
465
15,684
saleor
saleor/tests/e2e/orders/discounts/test_order_products_on_percentage_sale.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...sales.utils import create_sale, create_sale_channel_listing, sale_catalogues_add from ...shop.utils.preparing_shop import pr...
156
4,793
saleor
saleor/tests/e2e/orders/discounts/test_order_products_on_promotion_and_manual_order_discount.py
.py
from decimal import Decimal import pytest from .....core.prices import quantize_price from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_pr...
184
7,047
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_usage_is_released_when_voucher_is_removed.py
.py
import pytest from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...utils import assign_permissions from ...vouchers.utils import ( create_voucher, create_voucher_channel_listing, get_voucher, ) from ..ut...
146
4,468
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_entire_order.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assig...
428
15,958
saleor
saleor/tests/e2e/orders/discounts/test_order_products_on_fixed_promotion.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...promotions.utils import create_promotion, create_promotion_rule from ...shop.utils.preparing_shop import prepare_default_sho...
141
5,554
saleor
saleor/tests/e2e/orders/discounts/test_order_voucher_free_shipping.py
.py
import pytest from .....product.tasks import recalculate_discounted_price_for_products_task from ... import DEFAULT_ADDRESS from ...product.utils.preparing_product import prepare_product from ...shop.utils.preparing_shop import prepare_shop from ...taxes.utils import update_country_tax_rates from ...utils import assig...
231
8,128
saleor
saleor/tests/e2e/product/test_product_no_longer_on_promotion_when_promotion_is_removed.py
.py
import pytest from ....product.tasks import recalculate_discounted_price_for_products_task from ..promotions.utils import ( create_promotion, create_promotion_rule, delete_promotion, promotion_query, ) from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions f...
103
3,643
saleor
saleor/tests/e2e/product/test_create_simple_product.py
.py
import pytest from ..attributes.utils import attribute_create from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, cr...
110
3,297
saleor
saleor/tests/e2e/product/test_should_create_variants_in_bulk.py
.py
import pytest from ..attributes.utils import attribute_create from ..shop.utils.preparing_shop import prepare_default_shop from ..utils import assign_permissions from .utils import ( create_category, create_product, create_product_channel_listing, create_product_type, create_variants_in_bulk, g...
163
5,396
saleor
saleor/tests/e2e/product/test_create_product_with_all_attributes_types.py
.py
import datetime import json import pytest from django.conf import settings from ....tests.utils import dummy_editorjs from ..attributes.utils import prepare_all_attributes_in_bulk from ..pages.utils import create_page, create_page_type from ..utils import assign_permissions from .utils import ( create_category, ...
114
3,772
saleor
saleor/tests/e2e/product/test_create_product_with_restricted_reference_attributes.py
.py
import pytest from ..attributes.utils import attribute_create, attribute_update from ..pages.utils import create_page, create_page_type from ..utils import assign_permissions from .utils import ( create_category, create_product, create_product_type, create_product_variant, raw_create_product, u...
209
7,561
saleor
saleor/tests/e2e/product/utils/product_variant_channel_listing.py
.py
from ...utils import get_graphql_content PRODUCT_CHANNEL_LISTING_UPDATE_MUTATION = """ mutation UpdateProductVariantChannelListing( $productVariantId: ID!, $input: [ProductVariantChannelListingAddInput!]! ) { productVariantChannelListingUpdate(id: $productVariantId, input: $input) { errors { field ...
79
1,712
saleor
saleor/tests/e2e/product/utils/collection_add_products.py
.py
from ...utils import get_graphql_content COLLECTION_ADD_PRODUCTS_MUTATION = """ mutation CollectionAssignProduct($id: ID!, $productIds: [ID!]!) { collectionAddProducts(collectionId: $id, products: $productIds) { errors { code message field } collection { id products(first: 5...
44
925
saleor
saleor/tests/e2e/product/utils/product_channel_listing.py
.py
import datetime from ...utils import get_graphql_content PRODUCT_CHANNEL_LISTING_UPDATE_MUTATION = """ mutation UpdateProductChannelListing( $productId: ID!, $input: ProductChannelListingUpdateInput! ) { productChannelListingUpdate(id: $productId, input: $input) { errors { field message co...
108
2,926
saleor
saleor/tests/e2e/product/utils/product_variant_stock_update.py
.py
from ...utils import get_graphql_content PRODUCT_VARIANT_STOCK_UPDATE_MUTATION = """ mutation productVariantStocksUpdate ($stocks: [StockInput!]!, $id: ID!) { productVariantStocksUpdate(stocks: $stocks, variantId: $id) { errors { message field } productVariant { id stocks { ...
46
1,020
saleor
saleor/tests/e2e/product/utils/__init__.py
.py
from .category import create_category from .collection import create_collection from .collection_add_products import add_product_to_collection from .collection_listing_update import create_collection_channel_listing from .product import create_product, raw_create_product from .product_attribute_assignment_update import...
47
1,703
saleor
saleor/tests/e2e/product/utils/product.py
.py
from ...utils import get_graphql_content PRODUCT_CREATE_MUTATION = """ mutation createProduct($input: ProductCreateInput!) { productCreate(input: $input) { errors { field code message attributes } product { id name productType { id } category ...
98
1,928
saleor
saleor/tests/e2e/product/utils/category.py
.py
from ...utils import get_graphql_content CATEGORY_CREATE_MUTATION = """ mutation CreateCategory($input: CategoryInput!) { categoryCreate(input: $input) { errors { field code message } category { id name } } } """ def create_category( staff_api_client, name="T...
44
806
saleor
saleor/tests/e2e/product/utils/product_query.py
.py
from ...utils import get_graphql_content PRODUCT_QUERY = """ query Product($id: ID!, $channel: String) { product(id: $id, channel: $channel) { id name attributes { attribute { id } values { name } } pricing { onSale } variants { id ...
90
1,377
saleor
saleor/tests/e2e/product/utils/product_variant_bulk_create.py
.py
from ...utils import get_graphql_content PRODUCT_VARIANT_BULK_CREATE_MUTATION = """ mutation ProductVariantBulkCreate($id: ID!, $input: [ProductVariantBulkCreateInput!]!) { productVariantBulkCreate(product: $id, variants: $input) { errors { field code index channels message } ...
65
1,260
saleor
saleor/tests/e2e/product/utils/preparing_product.py
.py
from . import ( create_category, create_product, create_product_channel_listing, create_product_type, create_product_variant, create_product_variant_channel_listing, ) def prepare_product( e2e_staff_api_client, warehouse_id, channel_id, variant_price, product_type_slug="def...
92
2,202
saleor
saleor/tests/e2e/product/utils/product_type.py
.py
from ...utils import get_graphql_content PRODUCT_TYPE_CREATE_MUTATION = """ mutation createProductType($input: ProductTypeInput!) { productTypeCreate(input: $input) { errors { field message code } productType { id name slug kind isShippingRequired has...
73
1,666
saleor
saleor/tests/e2e/product/utils/product_attribute_assignment_update.py
.py
from ...utils import get_graphql_content PRODUCT_ATTRIBUTE_ASSIGNMENT_UPDATE_MUTATION = """ mutation ProductAttributeAssignmentUpdate( $operations: [ProductAttributeAssignmentUpdateInput!]!, $id: ID!) { productAttributeAssignmentUpdate(operations: $operations, productTypeId: $id) { errors { field ...
51
1,132
saleor
saleor/tests/e2e/product/utils/collection.py
.py
from ...utils import get_graphql_content CATEGORY_COLLECTION_MUTATION = """ mutation CollectionCreate($input: CollectionCreateInput!) { collectionCreate(input: $input) { errors { field code message } collection { id name slug } } } """ def create_collection( ...
45
849
saleor
saleor/tests/e2e/product/utils/product_type_update.py
.py
from ...utils import get_graphql_content PRODUCT_TYPE_UPDATE_MUTATION = """ mutation ProductTypeUpdate($id: ID!, $input: ProductTypeInput!) { productTypeUpdate(id: $id, input: $input) { errors { field message code } productType { id name slug kind isShippin...
54
1,034
saleor
saleor/tests/e2e/product/utils/product_variant.py
.py
from ...utils import get_graphql_content PRODUCT_VARIANT_CREATE_MUTATION = """ mutation createVariant($input: ProductVariantCreateInput!) { productVariantCreate(input: $input) { errors { field message code } productVariant { id name quantityLimitPerCustomer produ...
79
1,630
saleor
saleor/tests/e2e/product/utils/collection_listing_update.py
.py
from ...utils import get_graphql_content COLLECTION_CHANNEL_LISTING_UPDATE_MUTATION = """ mutation CollectionListing($id: ID!, $input: CollectionChannelListingUpdateInput!) { collectionChannelListingUpdate(id: $id, input: $input) { errors { code field message channels } collection...
61
1,415
saleor
saleor/tests/e2e/product/utils/product_update.py
.py
from ...utils import get_graphql_content PRODUCT_UPDATE_MUTATION = """ mutation ProductUpdate($id: ID!, $input: ProductInput!) { productUpdate(id: $id, input: $input) { errors { field message code } product { id name productType { id } category { ...
61
1,031
saleor
saleor/tests/e2e/account/account/test_staff_login_disabled_mode.py
.py
from unittest.mock import patch import pytest from .....site import PasswordLoginMode from ...account.utils.token_create import raw_token_create from ...conftest import E2eApiClient from ...product.utils.category import create_category from ...product.utils.product import PRODUCT_CREATE_MUTATION from ...product.utils...
110
3,805
saleor
saleor/tests/e2e/account/account/test_should_login_before_email_confirmation.py
.py
from unittest import mock import pytest from .....account.models import User from .....graphql.core.utils import to_global_id_or_none from ...shop.utils import prepare_shop from ...utils import assign_permissions from ..utils import account_register, token_create @mock.patch("saleor.account.throttling.cache") @pyte...
79
2,170
saleor
saleor/tests/e2e/account/account/test_should_not_be_able_to_login_with_invalid_credentials.py
.py
from unittest.mock import patch import pytest from saleor.account.throttling import get_cache_key_blocked_ip from ...shop.utils import prepare_shop from ...utils import assign_permissions from ..utils import account_register, raw_token_create @pytest.mark.e2e @patch("saleor.account.throttling.get_client_ip") @patc...
94
2,886
saleor
saleor/tests/e2e/account/account/test_should_not_be_able_to_create_account_with_existing_email.py
.py
import pytest from .....account.models import User from ...shop.utils import prepare_shop from ...utils import assign_permissions from ..utils import account_register, raw_account_register @pytest.mark.e2e def test_should_not_be_able_to_create_account_with_existing_email_core_1503( e2e_not_logged_api_client, ...
65
1,861
saleor
saleor/tests/e2e/account/account/test_login_throttling.py
.py
import datetime from unittest.mock import patch import pytest from django.utils import timezone from freezegun import freeze_time from .....account.error_codes import AccountErrorCode from .....account.models import User from .....account.throttling import ( get_cache_key_blocked_ip, get_cache_key_failed_ip, ...
161
5,860
saleor
saleor/tests/e2e/account/account/test_should_create_account_without_email_confirmation.py
.py
from unittest import mock import pytest from .....account.models import User from .....graphql.core.utils import to_global_id_or_none from ...shop.utils import prepare_shop from ...utils import assign_permissions from ..utils import account_register, token_create @mock.patch("saleor.account.throttling.cache") @pyte...
74
2,051
saleor
saleor/tests/e2e/account/account/test_staff_login_customers_only_mode.py
.py
from unittest.mock import patch import pytest from .....site import PasswordLoginMode from ...account.utils.token_create import raw_token_create from ...conftest import E2eApiClient from ...product.utils.category import create_category from ...product.utils.product import PRODUCT_CREATE_MUTATION from ...product.utils...
106
3,768
saleor
saleor/tests/e2e/account/staff/test_should_bulk_update_customers_metadata.py
.py
import pytest from ...utils import assign_permissions from ..utils import create_customer, customer_bulk_update @pytest.mark.e2e def test_should_bulk_update_customers_metadata_core_1513( e2e_staff_api_client, permission_manage_users, ): # Before permissions = [ permission_manage_users, ] ...
67
2,064
saleor
saleor/tests/e2e/account/staff/test_create_and_update_customer_with_metadata.py
.py
import pytest from ...utils import assign_permissions from ..utils import create_customer, customer_update @pytest.mark.e2e def test_create_and_update_customer_with_metadata_core_1514( e2e_staff_api_client, permission_manage_users, ): # Before permissions = [ permission_manage_users, ] ...
55
1,574
saleor
saleor/tests/e2e/account/staff/test_create_and_update_staff_with_metadata.py
.py
import pytest from ...utils import assign_permissions from ..utils import create_staff, update_staff @pytest.mark.e2e def test_create_and_update_staff_with_metadata_core_1515( e2e_staff_api_client, permission_manage_staff, ): # Before permissions = [ permission_manage_staff, ] assign_...
55
1,563
saleor
saleor/tests/e2e/account/utils/user.py
.py
from ...utils import get_graphql_content from .fragments import ADDRESS_FRAGMENT USER_QUERY = ( """ query User($id: ID!) { user(id: $id) { id email firstName lastName isStaff isActive isConfirmed addresses {...
53
1,087
saleor
saleor/tests/e2e/account/utils/staff_create.py
.py
from ...utils import get_graphql_content STAFF_CREATE_MUTATION = """ mutation CreateStaff($input: StaffCreateInput!){ staffCreate(input:$input) { user { id metadata { key value } privateMetadata { key value } } errors { field messa...
43
712
saleor
saleor/tests/e2e/account/utils/fragments.py
.py
ADDRESS_FRAGMENT = """ fragment Address on Address { id firstName lastName companyName streetAddress1 streetAddress2 city cityArea postalCode countryArea phone country { code } } """
19
247
saleor
saleor/tests/e2e/account/utils/create_customer.py
.py
from ...utils import get_graphql_content CUSTOMER_CREATE_MUTATION = """ mutation CreateCustomer ($input: UserCreateInput!) { customerCreate( input: $input ) { errors { field message code } user { id email metadata { key value } private...
48
800
saleor
saleor/tests/e2e/account/utils/__init__.py
.py
from .account_address_delete import account_address_delete from .account_register import account_register, raw_account_register from .create_customer import create_customer from .customer_bulk_update import customer_bulk_update from .customer_update import customer_update from .me import get_own_data from .staff_create...
26
755
saleor
saleor/tests/e2e/account/utils/account_register.py
.py
from ...utils import get_graphql_content ACCOUNT_REGISTER_MUTATION = """ mutation AccountRegister($input: AccountRegisterInput!) { accountRegister(input: $input) { errors { field message code } requiresConfirmation user { id email isActive } } } """ def raw...
68
1,323
saleor
saleor/tests/e2e/account/utils/me.py
.py
from ...utils import get_graphql_content from .fragments import ADDRESS_FRAGMENT ME_QUERY = ( """ query Me{ me{ id orders(first:10){ edges{ node{ number status } } } addresses { ...Address } } } """ + ADDRESS_FRAGMENT ) def get_own...
39
564
saleor
saleor/tests/e2e/account/utils/account_address_delete.py
.py
from ...utils import get_graphql_content ACCOUNT_ADDRESS_DELETE_MUTATION = """ mutation deleteUserAddress($id: ID!) { accountAddressDelete(id: $id) { address { city } user { id } errors { field ...
40
815
saleor
saleor/tests/e2e/account/utils/staff_update.py
.py
from ...utils import get_graphql_content STAFF_UPDATE_MUTATION = """ mutation StaffUpdate($id: ID!, $input: StaffUpdateInput!){ staffUpdate(id: $id, input: $input) { user { id metadata { key value } privateMetadata { key value } } errors {...
46
787
saleor
saleor/tests/e2e/account/utils/token_create.py
.py
from ...utils import get_graphql_content TOKEN_CREATE_MUTATION = """ mutation TokenCreate($email: String!, $password: String!) { tokenCreate(email: $email, password: $password) { errors { field message code } token refreshToken user { id email isActive is...
60
1,132