mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
refactor(test): make asset repair deterministic
This commit is contained in:
@@ -28,13 +28,10 @@ from erpnext.tests.utils import ERPNextTestSuite
|
|||||||
|
|
||||||
|
|
||||||
class TestAssetRepair(ERPNextTestSuite):
|
class TestAssetRepair(ERPNextTestSuite):
|
||||||
@classmethod
|
def setUp(self):
|
||||||
def setUpClass(cls):
|
self.load_test_records("Stock Entry")
|
||||||
super().setUpClass()
|
|
||||||
cls.load_test_records("Stock Entry")
|
|
||||||
set_depreciation_settings_in_company()
|
set_depreciation_settings_in_company()
|
||||||
create_item("_Test Stock Item")
|
create_item("_Test Stock Item")
|
||||||
frappe.db.sql("delete from `tabTax Rule`")
|
|
||||||
|
|
||||||
def test_asset_status(self):
|
def test_asset_status(self):
|
||||||
date = nowdate()
|
date = nowdate()
|
||||||
|
|||||||
@@ -2260,6 +2260,14 @@ class ERPNextTestSuite(unittest.TestCase):
|
|||||||
"is_grouped_asset": 0,
|
"is_grouped_asset": 0,
|
||||||
"asset_naming_series": "ACC-ASS-.YYYY.-",
|
"asset_naming_series": "ACC-ASS-.YYYY.-",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Item",
|
||||||
|
"item_code": "_Test Stock Item",
|
||||||
|
"item_name": "Test Stock Item",
|
||||||
|
"is_stock_item": 1,
|
||||||
|
"item_group": "All Item Groups",
|
||||||
|
"stock_uom": "Nos",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
cls.item = []
|
cls.item = []
|
||||||
for x in records:
|
for x in records:
|
||||||
|
|||||||
Reference in New Issue
Block a user