diff options
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -40,6 +40,9 @@ class AmountTest(unittest.TestCase): | |||
40 | converted_amount = amount.in_currency("ETH", None, compute_value="ask") | 40 | converted_amount = amount.in_currency("ETH", None, compute_value="ask") |
41 | self.assertEqual(D("4"), converted_amount.value) | 41 | self.assertEqual(D("4"), converted_amount.value) |
42 | 42 | ||
43 | converted_amount = amount.in_currency("ETH", None, rate=D("0.02")) | ||
44 | self.assertEqual(D("0.2"), converted_amount.value) | ||
45 | |||
43 | def test__abs(self): | 46 | def test__abs(self): |
44 | amount = portfolio.Amount("SC", -120) | 47 | amount = portfolio.Amount("SC", -120) |
45 | self.assertEqual(120, abs(amount).value) | 48 | self.assertEqual(120, abs(amount).value) |