Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Move translation tests
fowczrek4829a7391ec2
diff --git a/tests/test_translation.py b/saleor/product/tests/test_translation.pysimilarity index 88%rename from tests/test_translation.pyrename to saleor/product/tests/test_translation.pyindex e7f39239df..516331f369 100644--- a/tests/test_translation.py+++ b/saleor/product/tests/test_translation.py@@ -8,7 +8,6 @@ from saleor.product.models import (ProductTranslation,ProductVariantTranslation,)-from saleor.shipping.models import ShippingMethodTranslation@pytest.fixture@@ -29,13 +28,6 @@ def attribute_value_translation_fr(translated_attribute):)-def shipping_method_translation_fr(shipping_method):- return ShippingMethodTranslation.objects.create(- language_code="fr", shipping_method=shipping_method, name="French name"- )--def test_translation(product, settings, product_translation_fr):assert product.translated.name == "Test product"assert not product.translated.description@@ -129,11 +121,3 @@ def test_voucher_translation(settings, voucher, voucher_translation_fr):assert not voucher.translated.name == "French name"settings.LANGUAGE_CODE = "fr"assert voucher.translated.name == "French name"---def shipping_method_translation(- settings, shipping_method, shipping_method_translation_fr-):- assert not shipping_method.translated.name == "French name"- settings.LANGUAGE_CODE = "fr"- assert shipping_method.translated.name == "French name"diff --git a/saleor/shipping/tests/__init__.py b/saleor/shipping/tests/__init__.pynew file mode 100644index 0000000000..e69de29bb2diff --git a/saleor/shipping/tests/test_translation.py b/saleor/shipping/tests/test_translation.pynew file mode 100644index 0000000000..3fbea206e2--- /dev/null+++ b/saleor/shipping/tests/test_translation.py@@ -0,0 +1,18 @@+import pytest++from saleor.shipping.models import ShippingMethodTranslation+++def shipping_method_translation_fr(shipping_method):+ return ShippingMethodTranslation.objects.create(+ language_code="fr", shipping_method=shipping_method, name="French name"+ )+++def shipping_method_translation(+ settings, shipping_method, shipping_method_translation_fr+):+ assert not shipping_method.translated.name == "French name"+ settings.LANGUAGE_CODE = "fr"+ assert shipping_method.translated.name == "French name"