Ejemplo n.º 1
0
 def test_inspect(self):
     p = ((self.ten_btc + self.twenty_btc) * 5 - self.ten_btc)
     p = p.quantize('0.01')
     self.assertEqual(
         inspect_price(p),
         "((((Price('10', currency='BTC') + Price('20', currency='BTC'))"
         " * 5) - Price('10', currency='BTC'))).quantize(Decimal('0.01'))")
Ejemplo n.º 2
0
 def test_inspect(self):
     p = ((self.ten_btc + self.twenty_btc) * 5 - self.ten_btc)
     p = p.quantize('0.01')
     self.assertEqual(
         inspect_price(p),
         "((((Price('10', currency='BTC') + Price('20', currency='BTC'))"
         " * 5) - Price('10', currency='BTC'))).quantize(Decimal('0.01'))")
Ejemplo n.º 3
0
 def test_inspect(self):
     tax = lineartax('1.2345678', name='Silly Tax')
     p = ((self.ten_btc + self.twenty_btc) * 5 + tax).quantize('0.01')
     self.assertEqual(
         inspect_price(p),
         "((Price('10', currency='BTC') + Price('20', currency='BTC')) * 5 + LinearTax('1.2345678', name='Silly Tax')).quantize('0.01')")