From ea1d08c3df4392e7f28d2b316faed4a8efae7dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Wed, 25 Mar 2015 18:55:37 +0100 Subject: [PATCH] Add None values in clause tests for operatorize --- tryton/common/domain_parser.py | 4 ++++ 1 file changed, 4 insertions(+) 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