mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 11:15:10 +00:00
fix: test case
(cherry picked from commit2d6f112727) (cherry picked from commit9b2b46737e)
This commit is contained in:
committed by
Mergify
parent
762a46a5e3
commit
1783594178
@@ -190,6 +190,9 @@ class StockEntry(StockController):
|
|||||||
if force:
|
if force:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
if frappe.flags.in_test:
|
||||||
|
return False
|
||||||
|
|
||||||
# If line items are more than 100 or record is older than 6 months
|
# 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:
|
if len(self.items) > 100 or month_diff(nowdate(), self.posting_date) > 6:
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -1708,6 +1708,7 @@ class TestStockEntry(FrappeTestCase):
|
|||||||
self.assertRaises(frappe.ValidationError, sr_doc.submit)
|
self.assertRaises(frappe.ValidationError, sr_doc.submit)
|
||||||
|
|
||||||
def test_enqueue_action(self):
|
def test_enqueue_action(self):
|
||||||
|
frappe.flags.in_test = False
|
||||||
item_code = "Test Enqueue Item - 001"
|
item_code = "Test Enqueue Item - 001"
|
||||||
create_item(item_code=item_code, is_stock_item=1, valuation_rate=10)
|
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())
|
self.assertFalse(doc.is_enqueue_action())
|
||||||
|
frappe.flags.in_test = True
|
||||||
|
|
||||||
|
|
||||||
def make_serialized_item(**args):
|
def make_serialized_item(**args):
|
||||||
|
|||||||
Reference in New Issue
Block a user