fix: Server Side test - teardown correctly
diff --git a/erpnext/e_commerce/variant_selector/test_variant_selector.py b/erpnext/e_commerce/variant_selector/test_variant_selector.py
index 608ff23..31c86f1 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 @@
})
variant.save()
- @classmethod
- def tearDownClass(cls):
+ def tearDown(self):
frappe.db.rollback()
def test_item_attributes(self):
@@ -72,6 +71,10 @@
# 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