diff --git a/tryton/common/domain_parser.py b/tryton/common/domain_parser.py index 5b81624b2a..2f938587df 100644 --- a/tryton/common/domain_parser.py +++ b/tryton/common/domain_parser.py @@ -785,6 +785,8 @@ def test_operatorize(): a = ('a', 'a', 'a') b = ('b', 'b', 'b') c = ('c', 'c', 'c') + null_ = ('d', None, 'x') + double_null_ = ('e', None, None) for value, result in ( (['a'], ['a']), (['a', 'or', 'b'], [['OR', 'a', 'b']]), @@ -810,6 +812,8 @@ def test_operatorize(): (['a', iter(['b', 'or', 'c'])], ['a', [['OR', 'b', 'c']]]), ([a, iter([b, ('or',), c])], [a, [['OR', b, c]]]), (['a', iter(['b', 'or'])], ['a', [['OR', 'b']]]), + ([null_], [null_]), + ([null_, 'or', double_null_], [['OR', null_, double_null_]]), ): assert rlist(operatorize(iter(value))) == result