You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
838 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Therp BV <http://therp.nl>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from lxml import etree
  5. from openerp.tests.common import TransactionCase
  6. class TestAccountFinancialReportHorizontal(TransactionCase):
  7. def test_account_financial_report_horizontal(self):
  8. action = self.env['accounting.report'].with_context(
  9. active_id=self.env.ref('account.menu_account_report_pl').id,
  10. active_model='ir.ui.view',
  11. ).create({}).check_report()
  12. data = action['data']
  13. html = self.env['report'].with_context(action['context']).get_html(
  14. self.env[data['model']].browse(data['ids']),
  15. action['report_name'],
  16. data=data,
  17. )
  18. self.assertTrue(etree.fromstring(html).xpath('//div[@class="row"]'))