Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update language code in translation tests
Marcin Gębalac63392377ebb
diff --git a/tests/api/test_translations.py b/tests/api/test_translations.pyindex 5b9b8365c6..0f2164cac9 100644--- a/tests/api/test_translations.py+++ b/tests/api/test_translations.py@@ -26,7 +26,7 @@ def test_product_translation(user_api_client, product):data = get_graphql_content(response)['data']assert data['product']['translation']['name'] == 'Produkt'- assert data['product']['translation']['language']['code'] == 'pl'+ assert data['product']['translation']['language']['code'] == 'PL'def test_product_variant_translation(user_api_client, variant):@@ -52,7 +52,7 @@ def test_product_variant_translation(user_api_client, variant):data = get_graphql_content(response)['data']assert data['productVariant']['translation']['name'] == 'Wariant'- assert data['productVariant']['translation']['language']['code'] == 'pl'+ assert data['productVariant']['translation']['language']['code'] == 'PL'def test_collection_translation(user_api_client, collection):@@ -77,7 +77,7 @@ def test_collection_translation(user_api_client, collection):data = get_graphql_content(response)['data']assert data['collection']['translation']['name'] == 'Kolekcja'- assert data['collection']['translation']['language']['code'] == 'pl'+ assert data['collection']['translation']['language']['code'] == 'PL'def test_category_translation(user_api_client, category):@@ -101,7 +101,7 @@ def test_category_translation(user_api_client, category):data = get_graphql_content(response)['data']assert data['category']['translation']['name'] == 'Kategoria'- assert data['category']['translation']['language']['code'] == 'pl'+ assert data['category']['translation']['language']['code'] == 'PL'def test_voucher_translation(@@ -128,7 +128,7 @@ def test_voucher_translation(data = get_graphql_content(response)['data']assert data['voucher']['translation']['name'] == 'Bon'- assert data['voucher']['translation']['language']['code'] == 'pl'+ assert data['voucher']['translation']['language']['code'] == 'PL'def test_page_translation(user_api_client, page):@@ -152,7 +152,7 @@ def test_page_translation(user_api_client, page):data = get_graphql_content(response)['data']assert data['page']['translation']['title'] == 'Strona'- assert data['page']['translation']['language']['code'] == 'pl'+ assert data['page']['translation']['language']['code'] == 'PL'def test_attribute_translation(user_api_client, color_attribute):@@ -180,7 +180,7 @@ def test_attribute_translation(user_api_client, color_attribute):attribute = data['attributes']['edges'][0]['node']assert attribute['translation']['name'] == 'Kolor'- assert attribute['translation']['language']['code'] == 'pl'+ assert attribute['translation']['language']['code'] == 'PL'def test_attribute_value_translation(user_api_client, pink_attribute_value):@@ -213,7 +213,7 @@ def test_attribute_value_translation(user_api_client, pink_attribute_value):attribute_value = data['attributes']['edges'][0]['node']['values'][-1]assert attribute_value['translation']['name'] == 'Różowy'- assert attribute_value['translation']['language']['code'] == 'pl'+ assert attribute_value['translation']['language']['code'] == 'PL'def test_shipping_method_translation(@@ -244,7 +244,7 @@ def test_shipping_method_translation(shipping_method = data['shippingZone']['shippingMethods'][-1]assert shipping_method['translation']['name'] == 'DHL Polska'- assert shipping_method['translation']['language']['code'] == 'pl'+ assert shipping_method['translation']['language']['code'] == 'PL'def test_menu_item_translation(user_api_client, menu_item):@@ -269,7 +269,7 @@ def test_menu_item_translation(user_api_client, menu_item):data = get_graphql_content(response)['data']assert data['menuItem']['translation']['name'] == 'Odnośnik 1'- assert data['menuItem']['translation']['language']['code'] == 'pl'+ assert data['menuItem']['translation']['language']['code'] == 'PL'def test_shop_translation(user_api_client, site_settings):@@ -293,7 +293,7 @@ def test_shop_translation(user_api_client, site_settings):data = get_graphql_content(response)['data']assert data['shop']['translation']['headerText'] == 'Nagłówek'- assert data['shop']['translation']['language']['code'] == 'pl'+ assert data['shop']['translation']['language']['code'] == 'PL'def test_product_no_translation(user_api_client, product):@@ -579,7 +579,7 @@ def test_product_create_translation(data = get_graphql_content(response)['data']['productTranslate']assert data['product']['translation']['name'] == 'Produkt PL'- assert data['product']['translation']['language']['code'] == 'pl'+ assert data['product']['translation']['language']['code'] == 'PL'def test_product_update_translation(@@ -610,7 +610,7 @@ def test_product_update_translation(data = get_graphql_content(response)['data']['productTranslate']assert data['product']['translation']['name'] == 'Produkt PL'- assert data['product']['translation']['language']['code'] == 'pl'+ assert data['product']['translation']['language']['code'] == 'PL'def test_product_variant_create_translation(@@ -640,7 +640,7 @@ def test_product_variant_create_translation(data = get_graphql_content(response)['data']['productVariantTranslate']assert data['productVariant']['translation']['name'] == 'Wariant PL'- assert data['productVariant']['translation']['language']['code'] == 'pl'+ assert data['productVariant']['translation']['language']['code'] == 'PL'def test_product_variant_update_translation(@@ -672,7 +672,7 @@ def test_product_variant_update_translation(data = get_graphql_content(response)['data']['productVariantTranslate']assert data['productVariant']['translation']['name'] == 'Wariant PL'- assert data['productVariant']['translation']['language']['code'] == 'pl'+ assert data['productVariant']['translation']['language']['code'] == 'PL'def test_collection_create_translation(@@ -701,7 +701,7 @@ def test_collection_create_translation(data = get_graphql_content(response)['data']['collectionTranslate']assert data['collection']['translation']['name'] == 'Kolekcja PL'- assert data['collection']['translation']['language']['code'] == 'pl'+ assert data['collection']['translation']['language']['code'] == 'PL'def test_collection_update_translation(@@ -732,7 +732,7 @@ def test_collection_update_translation(data = get_graphql_content(response)['data']['collectionTranslate']assert data['collection']['translation']['name'] == 'Kolekcja PL'- assert data['collection']['translation']['language']['code'] == 'pl'+ assert data['collection']['translation']['language']['code'] == 'PL'def test_category_create_translation(@@ -761,7 +761,7 @@ def test_category_create_translation(data = get_graphql_content(response)['data']['categoryTranslate']assert data['category']['translation']['name'] == 'Kategoria PL'- assert data['category']['translation']['language']['code'] == 'pl'+ assert data['category']['translation']['language']['code'] == 'PL'def test_category_update_translation(@@ -792,7 +792,7 @@ def test_category_update_translation(data = get_graphql_content(response)['data']['categoryTranslate']assert data['category']['translation']['name'] == 'Kategoria PL'- assert data['category']['translation']['language']['code'] == 'pl'+ assert data['category']['translation']['language']['code'] == 'PL'def test_voucher_create_translation(@@ -821,7 +821,7 @@ def test_voucher_create_translation(data = get_graphql_content(response)['data']['voucherTranslate']assert data['voucher']['translation']['name'] == 'Bon PL'- assert data['voucher']['translation']['language']['code'] == 'pl'+ assert data['voucher']['translation']['language']['code'] == 'PL'def test_voucher_update_translation(@@ -852,7 +852,7 @@ def test_voucher_update_translation(data = get_graphql_content(response)['data']['voucherTranslate']assert data['voucher']['translation']['name'] == 'Bon PL'- assert data['voucher']['translation']['language']['code'] == 'pl'+ assert data['voucher']['translation']['language']['code'] == 'PL'def test_page_create_translation(@@ -881,7 +881,7 @@ def test_page_create_translation(data = get_graphql_content(response)['data']['pageTranslate']assert data['page']['translation']['title'] == 'Strona PL'- assert data['page']['translation']['language']['code'] == 'pl'+ assert data['page']['translation']['language']['code'] == 'PL'def test_page_update_translation(@@ -912,7 +912,7 @@ def test_page_update_translation(data = get_graphql_content(response)['data']['pageTranslate']assert data['page']['translation']['title'] == 'Strona PL'- assert data['page']['translation']['language']['code'] == 'pl'+ assert data['page']['translation']['language']['code'] == 'PL'def test_attribute_create_translation(@@ -941,7 +941,7 @@ def test_attribute_create_translation(data = get_graphql_content(response)['data']['attributeTranslate']assert data['attribute']['translation']['name'] == 'Kolor PL'- assert data['attribute']['translation']['language']['code'] == 'pl'+ assert data['attribute']['translation']['language']['code'] == 'PL'def test_attribute_update_translation(@@ -972,7 +972,7 @@ def test_attribute_update_translation(data = get_graphql_content(response)['data']['attributeTranslate']assert data['attribute']['translation']['name'] == 'Kolor PL'- assert data['attribute']['translation']['language']['code'] == 'pl'+ assert data['attribute']['translation']['language']['code'] == 'PL'def test_attribute_value_create_translation(@@ -1003,7 +1003,7 @@ def test_attribute_value_create_translation(data = get_graphql_content(response)['data']['attributeValueTranslate']assert data['attributeValue']['translation']['name'] == 'Róż PL'- assert data['attributeValue']['translation']['language']['code'] == 'pl'+ assert data['attributeValue']['translation']['language']['code'] == 'PL'def test_attribute_value_update_translation(@@ -1037,7 +1037,7 @@ def test_attribute_value_update_translation(data = get_graphql_content(response)['data']['attributeValueTranslate']assert data['attributeValue']['translation']['name'] == 'Róż PL'- assert data['attributeValue']['translation']['language']['code'] == 'pl'+ assert data['attributeValue']['translation']['language']['code'] == 'PL'def test_shipping_method_create_translation(@@ -1067,7 +1067,7 @@ def test_shipping_method_create_translation(data = get_graphql_content(response)['data']['shippingPriceTranslate']assert data['shippingMethod']['translation']['name'] == 'DHL PL'- assert data['shippingMethod']['translation']['language']['code'] == 'pl'+ assert data['shippingMethod']['translation']['language']['code'] == 'PL'def test_shipping_method_update_translation(@@ -1099,7 +1099,7 @@ def test_shipping_method_update_translation(data = get_graphql_content(response)['data']['shippingPriceTranslate']assert data['shippingMethod']['translation']['name'] == 'DHL PL'- assert data['shippingMethod']['translation']['language']['code'] == 'pl'+ assert data['shippingMethod']['translation']['language']['code'] == 'PL'def test_menu_item_update_translation(@@ -1130,7 +1130,7 @@ def test_menu_item_update_translation(data = get_graphql_content(response)['data']['menuItemTranslate']assert data['menuItem']['translation']['name'] == 'Odnośnik PL'- assert data['menuItem']['translation']['language']['code'] == 'pl'+ assert data['menuItem']['translation']['language']['code'] == 'PL'def test_shop_create_translation(@@ -1156,7 +1156,7 @@ def test_shop_create_translation(data = get_graphql_content(response)['data']['shopSettingsTranslate']assert data['shop']['translation']['headerText'] == 'Nagłówek PL'- assert data['shop']['translation']['language']['code'] == 'pl'+ assert data['shop']['translation']['language']['code'] == 'PL'def test_shop_update_translation(@@ -1185,7 +1185,7 @@ def test_shop_update_translation(data = get_graphql_content(response)['data']['shopSettingsTranslate']assert data['shop']['translation']['headerText'] == 'Nagłówek PL'- assert data['shop']['translation']['language']['code'] == 'pl'+ assert data['shop']['translation']['language']['code'] == 'PL'@pytest.mark.parametrize('kind, expected_typename', [