From 20ec0a808393d673958ae240a4723cb54640436c Mon Sep 17 00:00:00 2001
From: Yusuke Muraoka <yusuke@nexedi.com>
Date: Fri, 26 Feb 2010 11:24:03 +0000
Subject: [PATCH] complex query shall raise an exception when buggy case.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33146 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Catalog/tests/testERP5Catalog.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/product/ERP5Catalog/tests/testERP5Catalog.py b/product/ERP5Catalog/tests/testERP5Catalog.py
index f0907c6e7c..22731635ff 100644
--- a/product/ERP5Catalog/tests/testERP5Catalog.py
+++ b/product/ERP5Catalog/tests/testERP5Catalog.py
@@ -2351,11 +2351,16 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
                                         operator='AND')
     self.assertEqual(len(catalog(query=query_find_name_erp5)), 2)
 
-    query = ComplexQuery(query_find_european,
-                         query_find_name_erp5,
-                         operator='OR')
-    self.assertEqual(len(catalog(query=query)), 3)
-
+    try:
+      query = ComplexQuery(query_find_european,
+                           query_find_name_erp5,
+                           operator='OR')
+    except NotImplementedError:
+      # correct behaviour for now
+      raise
+    else:
+      self.fail("In this query pattern, ComplexQuery doesn't return valid result.")
+ 
   def test_check_security_table_content(self, quiet=quiet, run=run_all_test):
     sql_connection = self.getSQLConnection()
     portal = self.getPortalObject()
-- 
2.30.9