Commit 8117c043 authored by Jérome Perrin's avatar Jérome Perrin

Added a test for interraction between DomainSelection and CMFCategory

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5798 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d24ecb7
......@@ -509,6 +509,26 @@ class TestCMFCategory(ERP5TypeTestCase):
value_list = pc.getRelatedValueList(c)
self.assertEquals(len(value_list), 1)
def test_17_CategoriesAndDomainSelection(self, quiet=0,
run=run_all_test):
""" Tests Categories and Domain Selection """
if not run: return
if not quiet:
message = 'Test Domain Selection and Categories'
ZopeTestCase._print('\n '+message)
LOG('Testing... ', 0, message)
category_tool = self.getCategoryTool()
base = category_tool.newContent(portal_type = 'Base Category',
id='test_base_cat')
test = base.newContent(portal_type = 'Category', id = 'test_cat')
base.recursiveReindexObject()
obj = self.getOrganisationModule().newContent(
portal_type = 'Organisation')
obj.setCategoryList(['test_base_cat/test_cat'])
get_transaction().commit()
self.tic()
self.assert_(obj in test.getCategoryMemberValueList())
if __name__ == '__main__':
framework()
......
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