[ADD] base: test to check too long table aliases

Test for rev. 11f538fae6
This commit is contained in:
Cédric Pigeon 2015-09-08 11:43:14 +02:00 committed by Denis Ledoux
parent 11f538fae6
commit 20b5e0a4ab
1 changed files with 7 additions and 0 deletions

View File

@ -480,5 +480,12 @@ class test_expression(common.TransactionCase):
ids = Country.search(self.cr, self.uid, domain)
self.assertListEqual([be], ids)
def test_long_table_alias(self):
# To test the 64 characters limit for table aliases in PostgreSQL
self.patch_order('res.users', 'partner_id')
self.patch_order('res.partner', 'commercial_partner_id,company_id,name')
self.patch_order('res.company', 'parent_id')
self.env['res.users'].search([('name', '=', 'test')])
if __name__ == '__main__':
unittest2.main()