[Erp5-report] r30039 - /erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 27 16:06:07 CET 2009
Author: vincent
Date: Tue Oct 27 16:06:05 2009
New Revision: 30039
URL: http://svn.erp5.org?rev=30039&view=rev
Log:
Add one more select_dict case: when there is no direct hint given, but the query implicitely favors a table over the other.
Modified:
erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py
Modified: erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py?rev=30039&r1=30038&r2=30039&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py [utf8] Tue Oct 27 16:06:05 2009
@@ -468,6 +468,13 @@
select_dict = sql_expression.getSelectDict()
self.assertTrue('ambiguous_mapping' in select_dict, select_dict)
self.assertTrue('bar' in select_dict['ambiguous_mapping'], select_dict['ambiguous_mapping'])
+ # Ambiguous case, without a direct hint, but one of the tables is used in
+ # the query: must succeed
+ sql_expression = self.asSQLExpression({'select_dict': {'ambiguous_mapping': None},
+ 'other_uid': None})
+ select_dict = sql_expression.getSelectDict()
+ self.assertTrue('ambiguous_mapping' in select_dict, select_dict)
+ self.assertTrue('bar' in select_dict['ambiguous_mapping'], select_dict['ambiguous_mapping'])
##return catalog(title=Query(title='a', operator='not'))
#return catalog(title={'query': 'a', 'operator': 'not'})
More information about the Erp5-report
mailing list