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.

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