ci: sync up action versions with framework

Fixup some tests for py312

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang
2024-03-27 12:55:46 +05:30
parent 54cd492217
commit 89b5e061af
4 changed files with 30 additions and 30 deletions

View File

@@ -227,7 +227,7 @@ class TestGrossProfit(FrappeTestCase):
"gross_profit_%": -50.0,
}
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
self.assertDictContainsSubset(expected_entry_without_dn, gp_entry[0])
self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry_without_dn)
# make delivery note
dn = make_delivery_note(sinv.name)
@@ -255,7 +255,7 @@ class TestGrossProfit(FrappeTestCase):
"gross_profit_%": 0.0,
}
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
self.assertDictContainsSubset(expected_entry_with_dn, gp_entry[0])
self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry_with_dn)
def test_bundled_delivery_note_with_different_warehouses(self):
"""
@@ -386,7 +386,7 @@ class TestGrossProfit(FrappeTestCase):
"gross_profit_%": -25.0,
}
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
self.assertDictContainsSubset(expected_entry, gp_entry[0])
self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry)
def test_crnote_against_invoice_with_multiple_instances_of_same_item(self):
"""
@@ -428,8 +428,8 @@ class TestGrossProfit(FrappeTestCase):
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
# Both items of Invoice should have '0' qty
self.assertEqual(len(gp_entry), 2)
self.assertDictContainsSubset(expected_entry, gp_entry[0])
self.assertDictContainsSubset(expected_entry, gp_entry[1])
self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry)
self.assertEqual(gp_entry[1], gp_entry[1] | expected_entry)
def test_standalone_cr_notes(self):
"""
@@ -465,7 +465,7 @@ class TestGrossProfit(FrappeTestCase):
"gross_profit_%": 100.0,
}
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
self.assertDictContainsSubset(expected_entry, gp_entry[0])
self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry)
def test_different_rates_in_si_and_dn(self):
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
@@ -557,4 +557,4 @@ class TestGrossProfit(FrappeTestCase):
"gross_profit_%": 12.5,
}
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
self.assertDictContainsSubset(expected_entry, gp_entry[0])
self.assertEqual(gp_entry[0], gp_entry[0] | expected_entry)