Commit 4a0ec490 authored by Gabriel Monnerat's avatar Gabriel Monnerat

add asserts

parent 6ca5cfeb
...@@ -2457,7 +2457,6 @@ class TestTransactions(AccountingTestCase): ...@@ -2457,7 +2457,6 @@ class TestTransactions(AccountingTestCase):
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
return AccountingTestCase.getBusinessTemplateList(self) + \ return AccountingTestCase.getBusinessTemplateList(self) + \
('erp5_invoicing', 'erp5_simplified_invoicing') ('erp5_invoicing', 'erp5_simplified_invoicing')
def _resetIdGenerator(self): def _resetIdGenerator(self):
# clear all existing ids in portal ids # clear all existing ids in portal ids
self.portal.portal_ids.clearGenerator(all=True) self.portal.portal_ids.clearGenerator(all=True)
...@@ -3198,6 +3197,16 @@ class TestTransactions(AccountingTestCase): ...@@ -3198,6 +3197,16 @@ class TestTransactions(AccountingTestCase):
for line in invoice.contentValues(): for line in invoice.contentValues():
self.assertTrue(line.getGroupingReference()) self.assertTrue(line.getGroupingReference())
def test_allowed_content_type_list(self):
portal_type_list = self.portal.portal_types['Sale Invoice Transaction'].\
getTypeAllowedContentTypeList()
assert 'Invoice Line' in portal_type_list, portal_type_list
portal_type_list = self.portal.portal_types['Purchase Invoice Transaction'].\
getTypeAllowedContentTypeList()
assert 'Invoice Line' in portal_type_list, portal_type_list
assert 'erp5_invoicing' in self.getBusinessTemplateList()
assert 'erp5_simplified_invoicing' in self.getBusinessTemplateList()
def test_roundDebitCredit_raises_if_big_difference(self): def test_roundDebitCredit_raises_if_big_difference(self):
invoice = self._makeOne( invoice = self._makeOne(
portal_type='Sale Invoice Transaction', portal_type='Sale Invoice Transaction',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment