Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add test
Adam Janikc1b365839a0b
diff --git a/tests/api/test_core.py b/tests/api/test_core.pyindex 5bc65aa1b7..75b7141ad2 100644--- a/tests/api/test_core.py+++ b/tests/api/test_core.py@@ -1,8 +1,9 @@-import json-from tests.utils import get_graphql_contentfrom django.shortcuts import reversefrom phonenumbers import COUNTRY_CODE_TO_REGION_CODE+from tests.utils import get_graphql_content+from saleor.core.permissions import MODELS_PERMISSIONS+from saleor.graphql.core.utils import handle_seo_fieldsdef test_shop_endpoint(settings, admin_api_client):@@ -35,3 +36,13 @@ def test_shop_endpoint(settings, admin_api_client):assert len(data['languages']) == len(languages)assert len(data['phonePrefixes']) == len(COUNTRY_CODE_TO_REGION_CODE)++def test_handle_seo_fields():+ title = 'camel title'+ description = 'fantasy description'+ data = {'seo_fields':+ {'seo_title': title,+ 'seo_description': description}}+ handle_seo_fields(data)+ assert data['seo_title'] == title+ assert data['seo_description'] == description