Commit 7266fc9a authored by Jérome Perrin's avatar Jérome Perrin

remove cache on hasMessage, and add test for ActiveObject.hasActivity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25336 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ea19a24c
......@@ -2,8 +2,8 @@
title:
connection_id:cmf_activity_sql_connection
max_rows:1
max_cache:100
cache_time:1
max_cache:0
cache_time:0
class_name:
class_file:
</dtml-comment>
......
......@@ -2,8 +2,8 @@
title:
connection_id:cmf_activity_sql_connection
max_rows:1
max_cache:100
cache_time:1
max_cache:0
cache_time:0
class_name:
class_file:
</dtml-comment>
......
......@@ -3205,6 +3205,20 @@ class TestCMFActivity(ERP5TypeTestCase):
finally:
delattr(Organisation, 'waitingActivity')
Queue.tic = original_queue_tic
def test_active_object_hasActivity(self):
active_object = self.portal.organisation_module.newContent(
portal_type='Organisation')
get_transaction().commit()
self.tic()
self.assertFalse(active_object.hasActivity())
for activity in ('SQLDict', 'SQLQueue'):
active_object.activate(activity=activity).getTitle()
get_transaction().commit()
self.assertTrue(active_object.hasActivity(), activity)
self.tic()
self.assertFalse(active_object.hasActivity(), activity)
def test_suite():
suite = unittest.TestSuite()
......
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