"storage/maria/ma_keycache.c" did not exist on "ceb0ce5002edf0824ce01f156cd8343a047e6b7a"
Commit 432a705f authored by Yusei Tahara's avatar Yusei Tahara

Add tests for sql generation.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17648 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d53bc3cb
...@@ -491,6 +491,38 @@ class TestPredicates(ERP5TypeTestCase): ...@@ -491,6 +491,38 @@ class TestPredicates(ERP5TypeTestCase):
stepAssertPredicateFalse stepAssertPredicateFalse
""") """)
def test_MembershipCriterion_SQLQuery(self, quiet=QUIET, run=RUN_ALL_TESTS):
"""
Make sure that predicate generate valid sql.
"""
if not run : return
predicate_without_membership_values = self.createPredicate(
membership_criterion_base_category_list=['group'])
self.assert_(predicate_without_membership_values.searchResults())
predicate_with_membership_values = self.createPredicate(
membership_criterion_base_category_list=['group'],
membership_criterion_category_list=GROUP_STOREVER_PATH,
)
self.assert_(predicate_with_membership_values.searchResults())
def test_MultiValuedMembershipCriterion_SQLQuery(self, quiet=QUIET, run=RUN_ALL_TESTS):
"""
Make sure that predicate generate valid sql.
"""
if not run : return
predicate_without_membership_values = self.createPredicate(
multimembership_criterion_base_category_list=['group'])
self.assert_(predicate_without_membership_values.searchResults())
predicate_with_membership_values = self.createPredicate(
multimembership_criterion_base_category_list=['group'],
membership_criterion_category_list=GROUP_STOREVER_PATH,
)
self.assert_(predicate_with_membership_values.searchResults())
# TODO : # TODO :
# multi membership category # multi membership category
# asPredicate scripts # asPredicate scripts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment