def test_date_util_parse(): value = "2015-08-17T19:20:00" d = date_value(value) assert d.strftime("%Y-%m-%dT%H:%M:%S") == "2015-08-17T19:20:00" value = "2015-08-17" d = date_value(value) assert d.strftime("%Y-%m-%d") == "2015-08-17" value = "2015-08-17T19:20:59.999999" d = date_value(value) assert d.strftime("%Y-%m-%dT%H:%M:%S") == "2015-08-17T19:20:59" value = "2015-08-17T19:20:59.99999" d = date_value(value) assert d.strftime("%Y-%m-%dT%H:%M:%S") == "2015-08-17T19:20:59" value = "2015-08-17T19:20:59.999999999999999" d = date_value(value) assert d.strftime("%Y-%m-%dT%H:%M:%S") == "2015-08-17T19:20:59"
def test_fake_date_time_20(): date_value("12345678901234567890")
def test_fake_date_time_19(): date_value("1234567890123456789")
def test_invalid_date(): value = "2015-08-" date_value(value)