fix(py3): Convert filter to list for indexing
This commit is contained in:
parent
e1f867f29f
commit
6e1bb60b58
@ -562,7 +562,7 @@ class TestStockEntry(unittest.TestCase):
|
|||||||
for d in stock_entry.get("items"):
|
for d in stock_entry.get("items"):
|
||||||
if d.item_code != "_Test FG Item 2":
|
if d.item_code != "_Test FG Item 2":
|
||||||
rm_cost += flt(d.amount)
|
rm_cost += flt(d.amount)
|
||||||
fg_cost = filter(lambda x: x.item_code=="_Test FG Item 2", stock_entry.get("items"))[0].amount
|
fg_cost = list(filter(lambda x: x.item_code=="_Test FG Item 2", stock_entry.get("items")))[0].amount
|
||||||
self.assertEqual(fg_cost,
|
self.assertEqual(fg_cost,
|
||||||
flt(rm_cost + bom_operation_cost + work_order.additional_operating_cost, 2))
|
flt(rm_cost + bom_operation_cost + work_order.additional_operating_cost, 2))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user