def test_cost(self): inv = Inventory(self.POSITIONS_ALL_KINDS + [position.from_string('50.00 CAD')]) inv_cost = inv.cost() self.assertEqual(Inventory.from_string('40.50 USD, 139.10 CAD'), inv_cost)