Пример #1
0
    def test_search(self):
        dbname = common.get_db_name()
        admin_uid = self.env.ref('base.user_admin').id
        website = self.env['website'].get_current_website()

        robot = self.xmlrpc_object.execute(dbname, admin_uid, 'admin',
                                           'website', 'search_pages',
                                           [website.id], 'info')
        self.assertIn({'loc': '/website/info'}, robot)

        pages = self.xmlrpc_object.execute(dbname, admin_uid, 'admin',
                                           'website', 'search_pages',
                                           [website.id], 'page')
        self.assertIn(
            '/page_1',
            [p['loc'] for p in pages],
        )
Пример #2
0
 def test_jsonrpc_name_search(self):
     # well that's some sexy sexy call right there
     self._json_call(common.get_db_name(), self.admin_uid, 'admin',
                     'res.partner', 'name_search', 'admin')
Пример #3
0
 def test_jsonrpc_read_group(self):
     self._json_call(common.get_db_name(), self.admin_uid, 'admin',
                     'res.partner', 'read_group', [],
                     ['is_company', 'color'], ['parent_id'])
Пример #4
0
 def test_xmlrpc_name_search(self):
     self.xmlrpc_object.execute(common.get_db_name(), self.admin_uid,
                                'admin', 'res.partner', 'name_search',
                                "admin")
Пример #5
0
 def test_xmlrpc_read_group(self):
     groups = self.xmlrpc_object.execute(common.get_db_name(),
                                         self.admin_uid, 'admin',
                                         'res.partner', 'read_group', [],
                                         ['is_company', 'color'],
                                         ['parent_id'])
Пример #6
0
 def test_01_xmlrpc_login(self):
     """ Try to login on the common service. """
     db_name = common.get_db_name()
     uid = self.xmlrpc_common.login(db_name, 'admin', 'admin')
     self.assertEqual(uid, self.admin_uid)
Пример #7
0
def registry():
    return flectra.registry(common.get_db_name())