def test_today_datetime(self): frequency = Frequency(4, Frequency.UNIT.HOUR, Frequency.TYPE.PER, dateformat=Frequency.DATEFORMAT.DATETIME) self.assertEqual(type(frequency.today()), type(datetime.datetime.today()))
def test_today_monthday(self): frequency = Frequency(4, Frequency.UNIT.HOUR, Frequency.TYPE.PER, dateformat=Frequency.DATEFORMAT.MONTHDAY) self.assertEqual(type(frequency.today()), type(datetime.date.today()))
def test_frequency_8days(self): freq8 = Frequency(1, '8days', 'e', dateformat=None) print(freq8.today()) print(freq8.get_next_date(freq8.today(), '8days', 1)) self.assertEqual(freq8.dateformat, 'YYYYMMDD')