[FIX] test_osv_expression: fixed for new normalization API

bzr revid: odo@openerp.com-20110601062303-k9z0birutesfmkhp
This commit is contained in:
Olivier Dony
2011-06-01 08:23:03 +02:00
parent bf0e9e923c
commit cf09b1df94
@@ -114,12 +114,12 @@
Verify that normalize_domain() works.
-
!python {model: res.partner}: |
from osv.expression import expression
from osv import expression
norm_domain = domain = ['&',(1,'=',1),('a','=','b')]
assert norm_domain == expression.normalize_domain(domain), "Normalized domains should be left untouched"
assert norm_domain == expression.normalize(domain), "Normalized domains should be left untouched"
domain = [('x','in',['y','z']),('a.v','=','e'),'|','|',('a','=','b'),'!',('c','>','d'),('e','!=','f'),('g','=','h')]
norm_domain = ['&','&','&'] + domain
assert norm_domain == expression.normalize_domain(domain), "Non-normalized domains should be properly normalized"
assert norm_domain == expression.normalize(domain), "Non-normalized domains should be properly normalized"