def test_good_datetime_with_no_microseconds_or_timezone(self): item = {"time": "2013-12-17T15:38:32"} dt_value = eventlog.get_event_time(item) self.assertIsNotNone(dt_value) self.assertEquals(eventlog.datetime_to_timestamp(dt_value), "2013-12-17T15:38:32") self.assertEquals(eventlog.datetime_to_datestamp(dt_value), "2013-12-17")
def test_good_datetime_with_no_microseconds_or_timezone(self): item = {"time": "2013-12-17T15:38:32"} dt_value = eventlog.get_event_time(item) self.assertIsNotNone(dt_value) self.assertEquals(eventlog.datetime_to_timestamp(dt_value), "2013-12-17T15:38:32") self.assertEquals(eventlog.datetime_to_datestamp(dt_value), "2013-12-17")