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)
Example #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)
Example #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)