line: reiter für monate, kategorie + test
This commit is contained in:
parent
d6a8b254a3
commit
a23407f515
9 changed files with 333 additions and 3 deletions
|
@ -14,6 +14,25 @@ class CategoryTestCase(ModuleTestCase):
|
|||
'Test cashbook categoy module'
|
||||
module = 'cashbook'
|
||||
|
||||
def prep_category(self, name='Cat1'):
|
||||
""" create category
|
||||
"""
|
||||
pool = Pool()
|
||||
Company = pool.get('company.company')
|
||||
Category = pool.get('cashbook.category')
|
||||
|
||||
company = Company.search([])
|
||||
if len(company) > 0:
|
||||
company = company[0]
|
||||
else :
|
||||
company = create_company(name='m-ds')
|
||||
|
||||
category, = Category.create([{
|
||||
'company': company.id,
|
||||
'name': name,
|
||||
}])
|
||||
return category
|
||||
|
||||
@with_transaction()
|
||||
def test_category_create_nodupl_at_root(self):
|
||||
""" create category, duplicates are allowed at root-level
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue