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 @@ ...@@ -2,8 +2,8 @@
title: title:
connection_id:cmf_activity_sql_connection connection_id:cmf_activity_sql_connection
max_rows:1 max_rows:1
max_cache:100 max_cache:0
cache_time:1 cache_time:0
class_name: class_name:
class_file: class_file:
</dtml-comment> </dtml-comment>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
title: title:
connection_id:cmf_activity_sql_connection connection_id:cmf_activity_sql_connection
max_rows:1 max_rows:1
max_cache:100 max_cache:0
cache_time:1 cache_time:0
class_name: class_name:
class_file: class_file:
</dtml-comment> </dtml-comment>
......
...@@ -3206,6 +3206,20 @@ class TestCMFActivity(ERP5TypeTestCase): ...@@ -3206,6 +3206,20 @@ class TestCMFActivity(ERP5TypeTestCase):
delattr(Organisation, 'waitingActivity') delattr(Organisation, 'waitingActivity')
Queue.tic = original_queue_tic 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(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestCMFActivity)) suite.addTest(unittest.makeSuite(TestCMFActivity))
......
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