test_dashboard_data.py 572 B

123456789101112131415
  1. from odoo.addons.spreadsheet.tests.validate_spreadsheet_data import (
  2. ValidateSpreadsheetData,
  3. )
  4. from odoo.tests.common import tagged
  5. @tagged("-at_install", "post_install")
  6. class TestSpreadsheetDashboardData(ValidateSpreadsheetData):
  7. def test_validate_dashboard_data(self):
  8. """validate fields and models used in dashboards"""
  9. dashboards = self.env["spreadsheet.dashboard"].search([])
  10. for dashboard in dashboards:
  11. with self.subTest(dashboard.name):
  12. self.validate_spreadsheet_data(dashboard.raw, dashboard.name)