Ejemplo n.º 1
0
 def test_render_posting_price(self):
     str_posting = journal_text.render_posting(
         data.Posting('Assets:Something', position.from_string('10 VHT'),
                      A('45.32 USD'), None, None), self.number_format)
     self.assertEqual(
         '  Assets:Something                 10 VHT @ 45.32 USD',
         str_posting)
Ejemplo n.º 2
0
 def test_render_posting_no_cost(self):
     pos = position.from_string('100 USD')
     str_posting = journal_text.render_posting(
         data.Posting('Assets:Something', pos.units, pos.cost, None, None,
                      None), self.number_format)
     self.assertEqual('  Assets:Something                 100 USD',
                      str_posting)
Ejemplo n.º 3
0
 def test_render_posting_cost_price(self):
     pos = position.from_string('10 VHT {45.32 USD}')
     str_posting = journal_text.render_posting(
         data.Posting('Assets:Something', pos.units, pos.cost,
                      A('47.00 USD'), None, None), self.number_format)
     self.assertEqual(
         '  Assets:Something                 10 VHT {45.32 USD} @ 47.00 USD',
         str_posting)