def testComponents(self): value = Value({ "EUR": Decimal("31.99") }) self.assertEqual([value], list(value.components())) self.assertEqual([value], list(value.components(["EUR"]))) self.assertEqual([ZERO], list(value.components(["USD"]))) self.assertEqual([ZERO], list(value.components([])))
def testComponents(self): value1 = Value({ "EUR" : Decimal("81.45") }) value2 = Value({ "USD" : Decimal("-12.44") }) value = Value({"EUR" : Decimal("81.45"), "USD" : Decimal("-12.44") }) self.assertItemsEqual([value1, value2], value.components())