fix: Move test for Finance Books to Depreciation test suite

This commit is contained in:
GangaManoj 2021-10-13 21:36:10 +05:30
parent 83ec9879ee
commit e8986df3ca

View File

@ -56,12 +56,6 @@ class TestAsset(AssetSetup):
self.assertRaises(frappe.ValidationError, asset.save)
def test_finance_books_are_present_if_calculate_depreciation_is_enabled(self):
asset = create_asset(item_code="Macbook Pro", do_not_save=1)
asset.calculate_depreciation = 1
self.assertRaises(frappe.ValidationError, asset.save)
def test_available_for_use_date_is_after_purchase_date(self):
pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0,
location="Test Location", posting_date=getdate("2021-10-10"))
@ -852,6 +846,12 @@ class TestDepreciationBasics(AssetSetup):
self.assertRaises(frappe.ValidationError, asset.save)
def test_finance_books_are_present_if_calculate_depreciation_is_enabled(self):
asset = create_asset(item_code="Macbook Pro", do_not_save=1)
asset.calculate_depreciation = 1
self.assertRaises(frappe.ValidationError, asset.save)
def test_post_depreciation_entries(self):
"""Tests if post_depreciation_entries() works as expected."""