refactor(test): fix broken test cases in Sales Invoice

This commit is contained in:
ruthra kumar 2023-10-02 14:57:31 +05:30
parent 58065f31b1
commit 8ebe5733ac

View File

@ -52,6 +52,7 @@ class TestSalesInvoice(FrappeTestCase):
create_items(["_Test Internal Transfer Item"], uoms=[{"uom": "Box", "conversion_factor": 10}]) create_items(["_Test Internal Transfer Item"], uoms=[{"uom": "Box", "conversion_factor": 10}])
create_internal_parties() create_internal_parties()
setup_accounts() setup_accounts()
frappe.db.set_single_value("Accounts Settings", "acc_frozen_upto", None)
def tearDown(self): def tearDown(self):
frappe.db.rollback() frappe.db.rollback()
@ -3193,8 +3194,6 @@ class TestSalesInvoice(FrappeTestCase):
self.assertEqual(expected_gle[i][2], gle.debit) self.assertEqual(expected_gle[i][2], gle.debit)
self.assertEqual(getdate(expected_gle[i][3]), gle.posting_date) self.assertEqual(getdate(expected_gle[i][3]), gle.posting_date)
frappe.db.set_single_value("Accounts Settings", "acc_frozen_upto", None)
def test_standalone_serial_no_return(self): def test_standalone_serial_no_return(self):
si = create_sales_invoice( si = create_sales_invoice(
item_code="_Test Serialized Item With Series", update_stock=True, is_return=True, qty=-1 item_code="_Test Serialized Item With Series", update_stock=True, is_return=True, qty=-1