Skip to content

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

Fix tests

Pacu2038efad6755b
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.py
index b0af377b1b..9a8d030aaa 100644
--- a/saleor/dashboard/product/forms.py
+++ b/saleor/dashboard/product/forms.py
@@ -272,6 +272,10 @@ class ProductVariantForm(forms.ModelForm, AttributesMixin):
'price_override': pgettext_lazy(
'Override price', 'Override price'),
'name': pgettext_lazy('Product variant name', 'Name')}
+ help_texts = {
+ 'name': pgettext_lazy(
+ 'Product variant help text',
+ 'Variant\'s name is autogenerated, based on its attributes')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
diff --git a/saleor/seo/schema/product.py b/saleor/seo/schema/product.py
index 8677b04690..18c4106c27 100644
--- a/saleor/seo/schema/product.py
+++ b/saleor/seo/schema/product.py
@@ -9,7 +9,6 @@ def get_brand_from_attributes(attributes):
return
brand = ''
for key in attributes:
- import pdb; pdb.set_trace()
if key.name == 'brand':
brand = attributes[key].name
break
diff --git a/tests/test_product.py b/tests/test_product.py
index 0062a64953..46a1096b4f 100644
--- a/tests/test_product.py
+++ b/tests/test_product.py
@@ -314,7 +314,7 @@ def test_get_attributes_display_map(product_in_stock):
attr_value = product_attr.values.first()
assert len(attributes_display_map) == 1
- assert attributes_display_map == {product_attr.pk: attr_value}
+ assert attributes_display_map == {product_attr: attr_value}
def test_get_attributes_display_map_empty(product_with_no_attributes):