Ejemplo n.º 1
0
 def test__get_cron_date_time(self):
     ret = cron._get_cron_date_time(minute=STUB_CRON_TIMESTAMP['minute'],
                                 hour=STUB_CRON_TIMESTAMP['hour'],
                                 daymonth=STUB_CRON_TIMESTAMP['daymonth'],
                                 dayweek=STUB_CRON_TIMESTAMP['dayweek'],
                                 month=STUB_CRON_TIMESTAMP['month'])
     self.assertDictEqual(ret, STUB_CRON_TIMESTAMP)
Ejemplo n.º 2
0
 def test__get_cron_date_time(self):
     ret = cron._get_cron_date_time(minute=STUB_CRON_TIMESTAMP['minute'],
                                 hour=STUB_CRON_TIMESTAMP['hour'],
                                 daymonth=STUB_CRON_TIMESTAMP['daymonth'],
                                 dayweek=STUB_CRON_TIMESTAMP['dayweek'],
                                 month=STUB_CRON_TIMESTAMP['month'])
     self.assertDictEqual(ret, STUB_CRON_TIMESTAMP)
Ejemplo n.º 3
0
 def test__get_cron_date_time_daymonth_max(self):
     ret = cron._get_cron_date_time(minute='random',
                                    hour='random',
                                    daymonth='random',
                                    dayweek='random',
                                    month='random')
     self.assertTrue(int(ret['minute']) in range(0, 60))
     self.assertTrue(int(ret['hour']) in range(0, 24))
     self.assertTrue(int(ret['daymonth']) in range(1, 32))
     self.assertTrue(int(ret['dayweek']) in range(0, 8))
     self.assertTrue(int(ret['month']) in range(1, 13))