Skip to content

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

Fix django master issue, truncated seo three dots replaced by ellipsis See https://code.djangoproject.com/ticket/29654.

NyanKiyoshi64400ad412f4
diff --git a/tests/dashboard/test_product.py b/tests/dashboard/test_product.py
index feae3d26d5..61b653035a 100644
--- a/tests/dashboard/test_product.py
+++ b/tests/dashboard/test_product.py
@@ -1092,10 +1092,13 @@ def test_product_form_seo_description_too_long(unavailable_product):
assert form.is_valid()
form.save()
- assert len(unavailable_product.seo_description) <= 300
- assert unavailable_product.seo_description == (
+ new_seo_description = unavailable_product.seo_description
+ assert len(new_seo_description) <= 300
+ assert new_seo_description.startswith(
'Saying it fourth made saw light bring beginning kind over herb '
'won\'t creepeth multiply dry rule divided fish herb cattle greater '
'fly divided midst, gathering can\'t moveth seed greater subdue. '
'Lesser meat living fowl called. Dry don\'t wherein. Doesn\'t above '
- 'form sixth. Image moving earth without f...')
+ 'form sixth. Image moving earth without')
+ assert (
+ new_seo_description.endswith('...') or new_seo_description[-1] == '…')