Commit d575c987 authored by Nicolas Dumazet's avatar Nicolas Dumazet

interaction workflow now handles this / no need to tic() for this.

(I'm implementing my own TODOs; I know, nice, right?)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42862 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e345aaa3
...@@ -975,17 +975,8 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -975,17 +975,8 @@ class TestCMFCategory(ERP5TypeTestCase):
def test_31_assert_raise_if_base_category_is_missing(self): def test_31_assert_raise_if_base_category_is_missing(self):
#First remove Base Category #First remove Base Category
self.portal.portal_categories.manage_delObjects(['region']) self.portal.portal_categories.manage_delObjects(['region'])
get_transaction().commit()
self.tic()
# XXX should be done in an Interaction Workflow,
# with the guarantee that it's only ever called once per transaction,
# that is, if several categories get changed in the same transaction,
# call it only ONCE (that is not the case with the current
# 'once per transaction', which is actually 'once per transaction per object'
self.portal.portal_types.resetDynamicDocuments()
obj = self.portal.person_module.newContent(portal_type='Person') obj = self.portal.person_module.newContent(portal_type='Person')
get_transaction().commit() get_transaction().commit()
self.tic()
try: try:
#Setters #Setters
self.assertRaises(AttributeError, getattr, obj, 'setRegion') self.assertRaises(AttributeError, getattr, obj, 'setRegion')
...@@ -1002,7 +993,6 @@ class TestCMFCategory(ERP5TypeTestCase): ...@@ -1002,7 +993,6 @@ class TestCMFCategory(ERP5TypeTestCase):
#add Base Category #add Base Category
self.portal.portal_categories.newContent(id='region', portal_type='Base Category') self.portal.portal_categories.newContent(id='region', portal_type='Base Category')
get_transaction().commit() get_transaction().commit()
self.tic()
#check Method exists after base_category creation #check Method exists after base_category creation
#Setters #Setters
self.assertTrue(getattr(obj, 'setRegion') is not None) self.assertTrue(getattr(obj, 'setRegion') is not None)
......
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