Add test for view read

issue6311
review33921002
This commit is contained in:
Sergi Almacellas Abellana
2017-03-08 09:42:36 +01:00
parent 8e9f7e2d82
commit ae9c0a545d
+11 -1
View File
@@ -2,13 +2,23 @@
# this repository contains the full copyright notices and license terms.
import unittest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.pool import Pool
class DashboardTestCase(ModuleTestCase):
'Test Dashboard module'
module = 'dashboard'
@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])
self.assertIn('board', result['arch'])
def suite():
suite = trytond.tests.test_tryton.suite()