Esempio n. 1
0
 def test_interval_seconds_minutes(self):
     job = RepeatableJob()
     job.interval = 15
     job.interval_unit = 'minutes'
     self.assertEqual(900.0, job.interval_seconds())
Esempio n. 2
0
 def test_interval_seconds_seconds(self):
     job = RepeatableJob()
     job.interval = 15
     job.interval_unit = 'seconds'
     self.assertEqual(15.0, job.interval_seconds())
Esempio n. 3
0
 def test_interval_seconds_days(self):
     job = RepeatableJob()
     job.interval = 2
     job.interval_unit = 'days'
     self.assertEqual(172800.0, job.interval_seconds())
Esempio n. 4
0
 def test_interval_seconds_hours(self):
     job = RepeatableJob()
     job.interval = 2
     job.interval_unit = 'hours'
     self.assertEqual(7200.0, job.interval_seconds())
Esempio n. 5
0
 def test_interval_seconds_weeks(self):
     job = RepeatableJob()
     job.interval = 2
     job.interval_unit = 'weeks'
     self.assertEqual(1209600.0, job.interval_seconds())
Esempio n. 6
0
 def test_interval_seconds_minutes(self):
     job = RepeatableJob()
     job.interval = 15
     job.interval_unit = 'minutes'
     self.assertEqual(900.0, job.interval_seconds())
Esempio n. 7
0
 def test_interval_seconds_hours(self):
     job = RepeatableJob()
     job.interval = 2
     job.interval_unit = 'hours'
     self.assertEqual(7200.0, job.interval_seconds())
Esempio n. 8
0
 def test_interval_seconds_days(self):
     job = RepeatableJob()
     job.interval = 2
     job.interval_unit = 'days'
     self.assertEqual(172800.0, job.interval_seconds())
Esempio n. 9
0
 def test_interval_seconds_weeks(self):
     job = RepeatableJob()
     job.interval = 2
     job.interval_unit = 'weeks'
     self.assertEqual(1209600.0, job.interval_seconds())