Commit 77fc0a68 authored by Jérome Perrin's avatar Jérome Perrin

minimal tests for Balance Sheet and Profit & Loss reports.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16796 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e07560ec
......@@ -1648,6 +1648,46 @@ class TestAccountingReports(AccountingTestCase):
self.assertEquals(1, len(data_line_list))
self.checkLineProperties(data_line_list[0], debit=2900, credit=2900)
def testProfitAndLoss(self):
# Simple test of profit and loss
self.createAccountStatementDataSet(use_two_bank_accounts=1)
# set request variables and render
request_form = self.portal.REQUEST.form
request_form['at_date'] = DateTime(2006, 12, 31)
request_form['section_category'] = 'group/demo_group'
request_form['simulation_state'] = ['delivered']
# for now, we simply check that that the report is rendered with no error
# and it produces valid odf
from Products.ERP5OOo.tests.utils import Validator
odf_validator = Validator()
odf = self.portal.account_module.AccountModule_viewProfitAndLossReport()
err_list = odf_validator.validate(odf)
if err_list:
self.fail(''.join(err_list))
def testBalanceSheet(self):
# Simple test of balance sheet
self.createAccountStatementDataSet(use_two_bank_accounts=1)
# set request variables and render
request_form = self.portal.REQUEST.form
request_form['at_date'] = DateTime(2006, 12, 31)
request_form['section_category'] = 'group/demo_group'
request_form['simulation_state'] = ['delivered']
# for now, we simply check that that the report is rendered with no error
# and it produces valid odf
from Products.ERP5OOo.tests.utils import Validator
odf_validator = Validator()
odf = self.portal.account_module.AccountModule_viewBalanceSheetReport()
err_list = odf_validator.validate(odf)
if err_list:
self.fail(''.join(err_list))
def test_suite():
suite = unittest.TestSuite()
......
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