mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 17:55:40 +00:00
fix: Server Side test - teardown correctly
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user