account in module 'cashbook_account' verschoben

This commit is contained in:
Frederik Jaeckel 2022-08-15 12:35:31 +02:00
parent 149baef174
commit 7a07da852d
18 changed files with 41 additions and 220 deletions

View file

@ -160,39 +160,4 @@ class CategoryTestCase(ModuleTestCase):
}])],
}])
@with_transaction()
def test_category_create_with_account(self):
""" create category + account
"""
pool = Pool()
Account = pool.get('account.account')
Category = pool.get('cashbook.category')
company = self.prep_company()
with Transaction().set_context({
'company': company.id,
}):
account, = Account.create([{
'name': 'Account No 1',
'code': '0123',
}])
cat1, = Category.create([{
'name': 'Test 1',
'description': 'Info',
'account': account.id,
}])
self.assertEqual(cat1.name, 'Test 1')
self.assertEqual(cat1.rec_name, 'Test 1 [0123]')
self.assertEqual(cat1.description, 'Info')
self.assertEqual(cat1.company.rec_name, 'm-ds')
self.assertEqual(Category.search_count([
('account_code', '=', '0123'),
]), 1)
self.assertEqual(Category.search_count([
('account_code', '=', '123'),
]), 0)
# end CategoryTestCase