Commit e2ca31f4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Modify assertions in test_getSingleCategoryAcquiredMembershipListOnParent...

Modify assertions in test_getSingleCategoryAcquiredMembershipListOnParent because the expected return value of getSingleCategoryMembershipList() changes after r.22671.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24967 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f6f8c93
...@@ -963,12 +963,18 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -963,12 +963,18 @@ class TestCMFCategory(ERP5TypeTestCase):
def test_getSingleCategoryAcquiredMembershipListOnParent(self): def test_getSingleCategoryAcquiredMembershipListOnParent(self):
pc = self.getCategoriesTool() pc = self.getCategoriesTool()
obj = self.portal.person_module.newContent(portal_type='Person') obj = self.portal.person_module.newContent(portal_type='Person')
parent_url = self.portal.person_module.getRelativeUrl() parent = self.portal.person_module
# due to using getAcquiredPropertyList() for temp object, the change
# in r.22671 is required, and getSingleCategoryMembershipList()
# returns parent object itself instead of its relative url.
#parent_url = self.portal.person_module.getRelativeUrl()
parent_url = parent.getRelativeUrl()
self.assertEquals([], self.assertEquals([],
pc.getSingleCategoryMembershipList(obj, 'parent')) pc.getSingleCategoryMembershipList(obj, 'parent'))
self.assertEquals([parent_url], #self.assertEquals([parent_url],
self.assertEquals([parent],
pc.getSingleCategoryMembershipList(obj, 'parent', pc.getSingleCategoryMembershipList(obj, 'parent',
portal_type='Person Module')) portal_type='Person Module'))
...@@ -979,7 +985,8 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -979,7 +985,8 @@ class TestCMFCategory(ERP5TypeTestCase):
self.assertEquals([], self.assertEquals([],
pc.getSingleCategoryMembershipList(obj, 'parent', base=1)) pc.getSingleCategoryMembershipList(obj, 'parent', base=1))
self.assertEquals(['parent/%s' % parent_url], #self.assertEquals(['parent/%s' % parent_url],
self.assertEquals([parent],
pc.getSingleCategoryMembershipList(obj, 'parent', base=1, pc.getSingleCategoryMembershipList(obj, 'parent', base=1,
portal_type='Person Module')) portal_type='Person Module'))
...@@ -987,7 +994,8 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -987,7 +994,8 @@ class TestCMFCategory(ERP5TypeTestCase):
pc.getSingleCategoryMembershipList(obj, 'parent', pc.getSingleCategoryMembershipList(obj, 'parent',
checked_permission='View')) checked_permission='View'))
self.assertEquals([parent_url], #self.assertEquals([parent_url],
self.assertEquals([parent],
pc.getSingleCategoryMembershipList(obj, 'parent', pc.getSingleCategoryMembershipList(obj, 'parent',
checked_permission='View', checked_permission='View',
portal_type='Person Module')) portal_type='Person Module'))
......
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