diff --git a/erpnext/e_commerce/variant_selector/test_variant_selector.py b/erpnext/e_commerce/variant_selector/test_variant_selector.py index 608ff230a6..31c86f1fd5 100644 --- a/erpnext/e_commerce/variant_selector/test_variant_selector.py +++ b/erpnext/e_commerce/variant_selector/test_variant_selector.py @@ -39,8 +39,7 @@ class TestVariantSelector(unittest.TestCase): }) variant.save() - @classmethod - def tearDownClass(cls): + def tearDown(self): frappe.db.rollback() def test_item_attributes(self): @@ -72,6 +71,10 @@ class TestVariantSelector(unittest.TestCase): # Only L and M attribute values must be fetched since S is disabled self.assertEqual(len(attr_data[0]["values"]), 2) # ['Medium', 'Large'] + # teardown + small_variant.disabled = 1 + small_variant.save() + def test_next_item_variant_values(self): """ Test if on selecting an attribute value, the next possible values