aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rw-r--r--test.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test.py b/test.py
index a9baadf..edf6d01 100644
--- a/test.py
+++ b/test.py
@@ -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)