Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove unused imports in tests

Unknown8ff6905626ed
diff --git a/tests/gateway/test_braintree.py b/tests/gateway/test_braintree.py
index aa0ac26588..12dffe4237 100644
--- a/tests/gateway/test_braintree.py
+++ b/tests/gateway/test_braintree.py
@@ -1,6 +1,5 @@
-import datetime
from decimal import Decimal
-from unittest.mock import MagicMock, Mock, patch
+from unittest.mock import Mock, patch
import pytest
from braintree import (
@@ -9,9 +8,7 @@ from braintree.errors import Errors
from braintree.exceptions import NotFoundError
from braintree.validation_error import ValidationError
from django.core.exceptions import ImproperlyConfigured
-from prices import Money
-from saleor.payment import get_payment_gateway
from saleor.payment.gateways.braintree import (
CONFIRM_MANUALLY, THREE_D_SECURE_REQUIRED, TransactionKind, authorize,
capture, create_form, extract_gateway_response, get_braintree_gateway,
diff --git a/tests/gateway/test_dummy.py b/tests/gateway/test_dummy.py
index 98a60efb44..878b3d4ee8 100644
--- a/tests/gateway/test_dummy.py
+++ b/tests/gateway/test_dummy.py
@@ -4,7 +4,6 @@ import pytest
from saleor.payment import (
ChargeStatus, PaymentError, TransactionKind, get_payment_gateway)
-from saleor.payment.gateways.dummy.forms import DummyPaymentForm
from saleor.payment.utils import (
create_payment_information, gateway_authorize, gateway_capture,
gateway_charge, gateway_process_payment, gateway_refund, gateway_void)
diff --git a/tests/test_core.py b/tests/test_core.py
index e3d6b51f60..94cca19f46 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4,7 +4,6 @@ from unittest.mock import Mock, patch
from urllib.parse import urljoin
import pytest
-from django.db.models import Case, F, When
from django.shortcuts import reverse
from django.templatetags.static import static
from django.urls import translate_url
@@ -20,7 +19,7 @@ from saleor.core.utils.text import get_cleaner, strip_html
from saleor.core.weight import WeightUnits, convert_weight
from saleor.discount.models import Sale, Voucher
from saleor.order.models import Order
-from saleor.product.models import Product, ProductImage, ProductVariant
+from saleor.product.models import ProductImage
from saleor.shipping.models import ShippingZone
type_schema = {
@@ -120,7 +119,6 @@ def test_create_fake_order(db, monkeypatch, image):
for _ in random_data.create_shipping_zones():
pass
for _ in random_data.create_users(3):
- pass
random_data.create_products_by_schema('/', 10)
how_many = 5
for _ in random_data.create_orders(how_many):