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.

39 lines
1.4 KiB

  1. # -*- coding: utf-8 -*-
  2. # © 2014-2016 ACSONE SA/NV (<http://acsone.eu>)
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. import openerp.tests.common as common
  5. class TestFetchQuery(common.TransactionCase):
  6. def test_fetch_query(self):
  7. # create a report on account.analytic.line
  8. data = self.registry('mis.report.instance').compute(
  9. self.cr, self.uid,
  10. self.ref('mis_builder.mis_report_instance_test'))
  11. self.assertEquals(
  12. {'content':
  13. [{'description': u'total test',
  14. 'comment': '',
  15. 'style': None,
  16. 'parent_row_id': None,
  17. 'row_id': u'total_test',
  18. 'cols': [{'val': 0,
  19. 'val_r': u'\xa00\xa0',
  20. 'val_c': u'total_test = len(test)',
  21. }]
  22. }],
  23. 'header':
  24. [{'cols': [{'comment': '07/31/2014',
  25. 'colspan': 1,
  26. 'description': u'today',
  27. }],
  28. },
  29. {'cols': [{'colspan': 1,
  30. 'description': '',
  31. 'comment': '',
  32. }],
  33. },
  34. ],
  35. }, data)