fix(test): ignore stock validation

This commit is contained in:
Saqib Ansari 2022-02-08 16:04:08 +05:30
parent 3f962739fb
commit afc5c26d1c

View File

@ -158,6 +158,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
Round off error in consolidated invoice creation if POS Invoice has inclusive tax
'''
frappe.db.sql("delete from `tabPOS Invoice`")
frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 1)
try:
init_user_and_profile()
@ -205,12 +206,14 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
frappe.set_user("Administrator")
frappe.db.sql("delete from `tabPOS Profile`")
frappe.db.sql("delete from `tabPOS Invoice`")
frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 0)
def test_consolidation_round_off_error_2(self):
'''
Test the same case as above but with an Unpaid POS Invoice
'''
frappe.db.sql("delete from `tabPOS Invoice`")
frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 1)
try:
init_user_and_profile()
@ -265,3 +268,4 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
frappe.set_user("Administrator")
frappe.db.sql("delete from `tabPOS Profile`")
frappe.db.sql("delete from `tabPOS Invoice`")
frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 0)