Skip to content

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

Fix unit tests

Damian Wysockife9063adaefe
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 06b1358c30..f9d147ba17 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -422,7 +422,7 @@ def create_fake_user(save=True):
@patch("saleor.order.emails.send_payment_confirmation.delay")
def create_fake_payment(mock_email_confirmation, order):
payment = create_payment(
- gateway="mirumee.gateway.dummy",
+ gateway="mirumee.payments.dummy",
customer_ip_address=fake.ipv4(),
email=order.user_email,
order=order,
diff --git a/tests/api/benchmark/conftest.py b/tests/api/benchmark/conftest.py
index f4d6c40e71..a49aaefcee 100644
--- a/tests/api/benchmark/conftest.py
+++ b/tests/api/benchmark/conftest.py
@@ -142,7 +142,7 @@ def checkout_with_charged_payment(checkout_with_billing_address):
taxed_total = calculations.checkout_total(checkout)
payment = Payment.objects.create(
- gateway="mirumee.gateway.dummy",
+ gateway="mirumee.payments.dummy",
is_active=True,
total=taxed_total.gross.amount,
currency="USD",
diff --git a/tests/api/test_checkout.py b/tests/api/test_checkout.py
index 34266710e2..5d12dd06b6 100644
--- a/tests/api/test_checkout.py
+++ b/tests/api/test_checkout.py
@@ -453,7 +453,7 @@ def test_checkout_create_check_lines_quantity(
@pytest.fixture
def expected_dummy_gateway():
return {
- "id": "mirumee.gateway.dummy",
+ "id": "mirumee.payments.dummy",
"name": "Dummy",
"config": [{"field": "store_customer_card", "value": "false"}],
}
diff --git a/tests/api/test_order.py b/tests/api/test_order.py
index 10b26bbfad..26bb3d5251 100644
--- a/tests/api/test_order.py
+++ b/tests/api/test_order.py
@@ -1554,7 +1554,7 @@ def test_order_capture(
assert event_captured.user == staff_user
assert event_captured.parameters == {
"amount": str(amount),
- "payment_gateway": "mirumee.gateway.dummy",
+ "payment_gateway": "mirumee.payments.dummy",
"payment_id": "",
}
diff --git a/tests/api/test_payment.py b/tests/api/test_payment.py
index 111435bf8b..7ce8d89b39 100644
--- a/tests/api/test_payment.py
+++ b/tests/api/test_payment.py
@@ -604,7 +604,7 @@ def set_braintree_customer_id(customer_user, braintree_customer_id):
@pytest.fixture
def set_dummy_customer_id(customer_user, dummy_customer_id):
- gateway_name = "mirumee.gateway.dummy"
+ gateway_name = "mirumee.payments.dummy"
store_customer_id(customer_user, gateway_name, dummy_customer_id)
return customer_user
@@ -612,7 +612,7 @@ def set_dummy_customer_id(customer_user, dummy_customer_id):
def test_list_payment_sources(
mocker, dummy_customer_id, set_dummy_customer_id, user_api_client
):
- gateway = "mirumee.gateway.dummy"
+ gateway = "mirumee.payments.dummy"
query = """
{
me {
diff --git a/tests/conftest.py b/tests/conftest.py
index 0d77f46cbd..ac38362ea8 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1662,7 +1662,7 @@ def menu_item_translation_fr(menu_item):
@pytest.fixture
def payment_dummy(db, order_with_lines):
return Payment.objects.create(
- gateway="mirumee.gateway.dummy",
+ gateway="mirumee.payments.dummy",
order=order_with_lines,
is_active=True,
cc_first_digits="4111",
diff --git a/tests/gateway/test_gateway.py b/tests/gateway/test_gateway.py
index 79039eb460..a9c30d861b 100644
--- a/tests/gateway/test_gateway.py
+++ b/tests/gateway/test_gateway.py
@@ -79,7 +79,7 @@ CONFIRM_RESPONSE = GatewayResponse(
raw_response=RAW_RESPONSE,
)
TOKEN = "token"
-USED_GATEWAY = "mirumee.gateway.dummy"
+USED_GATEWAY = "mirumee.payments.dummy"
@pytest.fixture
diff --git a/tests/test_order.py b/tests/test_order.py
index c3b6c3a437..9391f50755 100644
--- a/tests/test_order.py
+++ b/tests/test_order.py
@@ -278,7 +278,7 @@ def test_order_queryset_to_ship(settings):
]
for order in orders_to_ship:
order.payments.create(
- gateway="mirumee.gateway.dummy",
+ gateway="mirumee.payments.dummy",
charge_status=ChargeStatus.FULLY_CHARGED,
total=order.total.gross.amount,
captured_amount=order.total.gross.amount,