Reviewers: ,


Please review this at http://codereview.tryton.org/160003/

Affected files:
  M tryton/common/tdp.py


Index: tryton/common/tdp.py
===================================================================
--- a/tryton/common/tdp.py
+++ b/tryton/common/tdp.py
@@ -486,7 +486,7 @@
     fmt = '%s%s%s'

     def split(self):
-        assert isinstance(self.right, Literal)
+        assert isinstance(self.right, (Literal, Comma))
         return self.right.split()

     def domain(self, parent_field=None):
@@ -1290,6 +1290,9 @@
         ('selection', '=', 'ham'), ('selection', '=', 'spam')]
     assert parser.parse('Selection: !Ham Selection: !Spam').domain() == [
         ('selection', '!=', 'ham'), ('selection', '!=', 'spam')]
+    assert parser.parse('Selection: !Ham; Spam Char: bar').domain() == [
+ ('selection', 'not in', ['ham', 'spam']), ('char', 'ilike', 'bar%')]
+

 def test_composite_string():
     parser = test_parser()
@@ -1427,6 +1430,13 @@
  [right]                      <class 'tryton.common.tdp.End'>'''

 if __name__ == '__main__':
+    test_comparator()
+    test_comma()
+    test_double_dot()
+    test_column()
+    test_quote_string()
+    test_quote_domain()
+    test_quote_complete()
     test_selection_complete()
     test_selection_domain()
     test_selection_string()


--
[email protected] mailing list

Reply via email to