Debian Codegraph @

odoorpc/tests/test_field_text.py

raw
1 # -*- coding: utf-8 -*-
2
3 import sys
4
5 from odoorpc.tests import LoginTestCase
6
7 # Python 2
8 if sys.version_info.major < 3:
9
10 def is_string(arg):
11 return isinstance(arg, str) or isinstance(arg, unicode) # noqa: F821
12
13
14 # Python >= 3
15 else:
16
17 def is_string(arg):
18 return isinstance(arg, str)
19
20
21 class TestFieldText(LoginTestCase):
22 def test_field_text_read(self):
23 # Test empty field
24 self.assertFalse(self.user.comment)
25 # Test field containing a value
26 Module = self.odoo.env['ir.module.module']
27 sale_id = Module.search([('name', '=', 'sale')])
28 sale_mod = Module.browse(sale_id)
29 self.assertTrue(is_string(sale_mod.views_by_module))
30
31 def test_field_text_write(self):
32 # TODO
33 pass