line: test korrigiert
This commit is contained in:
parent
b2147f56b3
commit
843ade71e9
1 changed files with 3 additions and 3 deletions
|
@ -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'))
|
||||||
|
|
Loading…
Reference in a new issue