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.

41 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 odoo.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.maxDiff = None
  12. self.assertEquals(
  13. {'body':
  14. [{'label': u'total test',
  15. 'description': '',
  16. 'style': None,
  17. 'parent_row_id': None,
  18. 'row_id': u'total_test',
  19. 'cells': [{'val': 0,
  20. 'val_r': u'0',
  21. 'val_c': u'total_test = len(test)',
  22. 'style': None,
  23. }]
  24. }],
  25. 'header':
  26. [{'cols': [{'description': '07/31/2014',
  27. 'label': u'today',
  28. 'colspan': 1,
  29. }],
  30. },
  31. {'cols': [{'label': '',
  32. 'description': '',
  33. 'colspan': 1,
  34. }],
  35. },
  36. ],
  37. }, data)