fix: Failing test, sider and linter

- Remove unused imports
- fix test `test_product_list_attribute_filter_builder`
This commit is contained in:
marination 2022-02-01 12:08:33 +05:30
parent 1d7f313b92
commit 2933cf243a
3 changed files with 2 additions and 12 deletions

View File

@ -175,9 +175,7 @@ class TestProductDataEngine(unittest.TestCase):
filter_engine = ProductFiltersBuilder()
attribute_filter = filter_engine.get_attribute_filters()[0]
attributes = attribute_filter.item_attribute_values
attribute_values = [d.attribute_value for d in attributes]
attribute_values = attribute_filter.item_attribute_values
self.assertEqual(attribute_filter.name, "Test Size")
self.assertGreater(len(attribute_values), 0)

View File

@ -1,5 +1,3 @@
import unittest
import frappe
from erpnext.controllers.item_variant import create_variant

View File

@ -2,7 +2,6 @@
# License: GNU General Public License v3. See license.txt
import copy
import itertools
import json
from typing import List
@ -18,11 +17,9 @@ from frappe.utils import (
getdate,
now_datetime,
nowtime,
random_string,
strip,
)
from frappe.utils.html_utils import clean_html
from frappe.website.utils import clear_cache
import erpnext
from erpnext.controllers.item_variant import (
@ -32,10 +29,7 @@ from erpnext.controllers.item_variant import (
make_variant_item_code,
validate_item_variant_attributes,
)
from erpnext.setup.doctype.item_group.item_group import (
get_parent_item_groups,
invalidate_cache_for,
)
from erpnext.setup.doctype.item_group.item_group import invalidate_cache_for
from erpnext.stock.doctype.item_default.item_default import ItemDefault