Commit 75b0f02e authored by Jérome Perrin's avatar Jérome Perrin

test for isAcquiredMemberOf


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28980 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b757ebc
...@@ -239,6 +239,17 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -239,6 +239,17 @@ class TestCMFCategory(ERP5TypeTestCase):
p1.setRegion(self.region1) p1.setRegion(self.region1)
self.failUnless(p1.isMemberOf(region_path)) self.failUnless(p1.isMemberOf(region_path))
def test_isAcquiredMemberOf(self):
region_path = 'region/%s' % self.region1
p1 = self.getPersonModule()._getOb(self.id1)
sub_person = p1._getOb(self.id1)
p1.setRegion(None)
self.failIf(p1.isAcquiredMemberOf(region_path))
self.failIf(sub_person.isAcquiredMemberOf(region_path))
p1.setRegion(self.region1)
self.failUnless(p1.isAcquiredMemberOf(region_path))
self.failUnless(sub_person.isAcquiredMemberOf(region_path))
def test_04_ReturnNone(self, quiet=quiet, run=run_all_test): def test_04_ReturnNone(self, quiet=quiet, run=run_all_test):
# Test if we getCategory return None if the cat is '' or None # Test if we getCategory return None if the cat is '' or None
if not run: return if not run: return
......
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