def test_is_time(): assert time.is_time(datetime.utcnow()) is True assert time.is_time('2017-02-14 08:08:12.999') is True assert time.is_time(Time.now()) is True assert time.is_time(None) is False assert time.is_time('2016-14-14 19:08') is False
def test_is_time(): assert time.is_time(datetime.utcnow()) is True assert time.is_time('2017-02-14 08:08:12.999', "%Y-%m-%d %H:%M:%S.%f") is True assert time.is_time(None) is False assert time.is_time('2016-14-14 19:08', "%Y-%b-%d %H:%M:%S") is False