test: Use assertSequenceEqual for comparision between Tuple / Lists
Use AssertSequence for type agnostic checks
This commit is contained in:
parent
b07dd1083a
commit
cb73528c9c
@ -114,7 +114,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
|
||||
(pcv.name),
|
||||
)
|
||||
|
||||
self.assertEqual(pcv_gle, expected_gle)
|
||||
self.assertSequenceEqual(pcv_gle, expected_gle)
|
||||
|
||||
pcv.reload()
|
||||
pcv.cancel()
|
||||
@ -175,7 +175,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
|
||||
(pcv.name),
|
||||
)
|
||||
|
||||
self.assertEqual(pcv_gle, expected_gle)
|
||||
self.assertSequenceEqual(pcv_gle, expected_gle)
|
||||
|
||||
def make_period_closing_voucher(self, submit=True):
|
||||
surplus_account = create_account()
|
||||
|
@ -133,7 +133,7 @@ class TestAsset(AssetSetup):
|
||||
order by account""",
|
||||
pi.name,
|
||||
)
|
||||
self.assertEqual(gle, expected_gle)
|
||||
self.assertSequenceEqual(gle, expected_gle)
|
||||
|
||||
pi.cancel()
|
||||
asset.cancel()
|
||||
@ -208,7 +208,7 @@ class TestAsset(AssetSetup):
|
||||
order by account""",
|
||||
asset.journal_entry_for_scrap,
|
||||
)
|
||||
self.assertEqual(gle, expected_gle)
|
||||
self.assertSequenceEqual(gle, expected_gle)
|
||||
|
||||
restore_asset(asset.name)
|
||||
|
||||
@ -253,7 +253,7 @@ class TestAsset(AssetSetup):
|
||||
si.name,
|
||||
)
|
||||
|
||||
self.assertEqual(gle, expected_gle)
|
||||
self.assertSequenceEqual(gle, expected_gle)
|
||||
|
||||
si.cancel()
|
||||
self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Partially Depreciated")
|
||||
@ -361,7 +361,7 @@ class TestAsset(AssetSetup):
|
||||
pr.name,
|
||||
)
|
||||
|
||||
self.assertEqual(pr_gle, expected_gle)
|
||||
self.assertSequenceEqual(pr_gle, expected_gle)
|
||||
|
||||
pi = make_invoice(pr.name)
|
||||
pi.submit()
|
||||
@ -381,7 +381,7 @@ class TestAsset(AssetSetup):
|
||||
pi.name,
|
||||
)
|
||||
|
||||
self.assertEqual(pi_gle, expected_gle)
|
||||
self.assertSequenceEqual(pi_gle, expected_gle)
|
||||
|
||||
asset = frappe.db.get_value("Asset", {"purchase_receipt": pr.name, "docstatus": 0}, "name")
|
||||
|
||||
@ -414,7 +414,7 @@ class TestAsset(AssetSetup):
|
||||
asset_doc.name,
|
||||
)
|
||||
|
||||
self.assertEqual(gle, expected_gle)
|
||||
self.assertSequenceEqual(gle, expected_gle)
|
||||
|
||||
def test_asset_cwip_toggling_cases(self):
|
||||
cwip = frappe.db.get_value("Asset Category", "Computers", "enable_cwip_accounting")
|
||||
@ -1287,7 +1287,7 @@ class TestDepreciationBasics(AssetSetup):
|
||||
asset.name,
|
||||
)
|
||||
|
||||
self.assertEqual(gle, expected_gle)
|
||||
self.assertSequenceEqual(gle, expected_gle)
|
||||
self.assertEqual(asset.get("value_after_depreciation"), 0)
|
||||
|
||||
def test_expected_value_change(self):
|
||||
|
@ -91,7 +91,7 @@ class TestAssetValueAdjustment(unittest.TestCase):
|
||||
adj_doc.journal_entry,
|
||||
)
|
||||
|
||||
self.assertEqual(gle, expected_gle)
|
||||
self.assertSequenceEqual(gle, expected_gle)
|
||||
|
||||
|
||||
def make_asset_value_adjustment(**args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user