fix: test case
This commit is contained in:
parent
7a3801578c
commit
2d6f112727
@ -187,6 +187,9 @@ class StockEntry(StockController):
|
||||
if force:
|
||||
return True
|
||||
|
||||
if frappe.flags.in_test:
|
||||
return False
|
||||
|
||||
# If line items are more than 100 or record is older than 6 months
|
||||
if len(self.items) > 100 or month_diff(nowdate(), self.posting_date) > 6:
|
||||
return True
|
||||
|
@ -1708,6 +1708,7 @@ class TestStockEntry(FrappeTestCase):
|
||||
self.assertRaises(frappe.ValidationError, sr_doc.submit)
|
||||
|
||||
def test_enqueue_action(self):
|
||||
frappe.flags.in_test = False
|
||||
item_code = "Test Enqueue Item - 001"
|
||||
create_item(item_code=item_code, is_stock_item=1, valuation_rate=10)
|
||||
|
||||
@ -1734,6 +1735,7 @@ class TestStockEntry(FrappeTestCase):
|
||||
)
|
||||
|
||||
self.assertFalse(doc.is_enqueue_action())
|
||||
frappe.flags.in_test = True
|
||||
|
||||
|
||||
def make_serialized_item(**args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user