line: test korrigiert

This commit is contained in:
Frederik Jaeckel 2022-09-12 00:16:06 +02:00
parent 165612a627
commit 0c099b11b3

View file

@ -915,14 +915,14 @@ class LineTestCase(ModuleTestCase):
'category': category_in.id, 'category': category_in.id,
'bookingtype': 'in', 'bookingtype': 'in',
'amount': Decimal('-1.0'), 'amount': Decimal('-1.0'),
'booktransf': book2.id, 'party': party.id,
}, { }, {
'date': date(2022, 6, 1), # out-category, return 'date': date(2022, 6, 1), # out-category, return
'description': 'out-return', # amount negative 'description': 'out-return', # amount negative
'category': category_out.id, 'category': category_out.id,
'bookingtype': 'out', 'bookingtype': 'out',
'amount': Decimal('-1.0'), 'amount': Decimal('-1.0'),
'booktransf': book2.id, 'party': party.id,
}])], }])],
}]) }])
self.assertEqual(book.name, 'Book 1') self.assertEqual(book.name, 'Book 1')
@ -936,7 +936,7 @@ class LineTestCase(ModuleTestCase):
# check payee # check payee
self.assertEqual(book.lines[0].payee.rec_name, 'Party') self.assertEqual(book.lines[0].payee.rec_name, 'Party')
self.assertEqual(Line.search_count([('payee', 'ilike', 'party%')]), 2) self.assertEqual(Line.search_count([('payee', 'ilike', 'party%')]), 4)
self.assertEqual(Line.search_count([('payee', 'ilike', 'book%')]), 2) self.assertEqual(Line.search_count([('payee', 'ilike', 'book%')]), 2)
self.assertEqual(book.lines[1].amount, Decimal('1.0')) self.assertEqual(book.lines[1].amount, Decimal('1.0'))