Files
tryton/modules/dashboard/tests/test_dashboard.py
T

28 lines
854 B
Python
Raw Normal View History

2014-12-02 12:55:19 +01:00
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
2009-12-23 00:04:42 +01:00
import unittest
import trytond.tests.test_tryton
2017-03-08 09:42:36 +01:00
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.pool import Pool
2009-12-23 00:04:42 +01:00
2015-01-27 18:13:33 +01:00
class DashboardTestCase(ModuleTestCase):
2014-01-12 19:59:44 +01:00
'Test Dashboard module'
2015-01-27 18:13:33 +01:00
module = 'dashboard'
2017-03-08 09:42:36 +01:00
@with_transaction()
def test_view_read(self):
'Test dashboard view read'
pool = Pool()
View = pool.get('ir.ui.view')
dashboard_id = View.dashboard_id()
result, = View.read([dashboard_id], ['arch'])
2017-03-08 09:42:36 +01:00
self.assertIn('board', result['arch'])
2012-04-03 20:07:02 +02:00
2009-12-23 00:04:42 +01:00
def suite():
2010-03-12 13:48:06 +01:00
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
DashboardTestCase))
return suite