Commit 6cd57023 authored by Vincent Pelletier's avatar Vincent Pelletier

getAlarmDate used to fail when PeriodicityStartDate was not defined. This was fixed in 20288.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28928 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1570720f
......@@ -687,6 +687,20 @@ class TestAlarm(ERP5TypeTestCase):
alarm.setProperty('bogus', None)
self.assertEquals(alarm.getProperty('bogus', None), None)
def test_20_UndefinedPeriodicityStartDate(self, quiet=0, run=run_all_test):
"""
Test that getAlarmDate does not crash when PeriodicityStartDate is not set.
"""
if not run: return
if not quiet:
message = 'Test undefined PeriodicityStartDate'
ZopeTestCase._print('\n%s ' % message)
LOG('Testing... ',0,message)
alarm = self.newAlarm()
# Test sanity check.
self.assertEqual(alarm.getPeriodicityStartDate(), None)
# Actual test.
self.assertEquals(alarm.getAlarmDate(), None)
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