示例#1
0
    def test_get_accounting_object(self):
        p = Parser(self.acc)
        p.accounting_object('1', '0123', 'Serviceavdelningen')

        obj = p.get_accounting_object('1', '0123')

        assert obj.name == ['Serviceavdelningen']
示例#2
0
 def test_get_undefined_acct_object(self):
     p = Parser(self.acc)
     obj = p.get_accounting_object('9999', '4711')
     assert obj.number == ['4711']
     assert obj.dimension[0].number == ['9999']
     assert len(p.parse_warnings) == 2
     assert '9999' in p.parse_warnings[0]
     assert '4711' in p.parse_warnings[1]