From a2e617e200b734edb6e0fa18db4caf76f13f6d64 Mon Sep 17 00:00:00 2001 From: Joaquin Casares Date: Thu, 19 Sep 2013 20:39:01 -0500 Subject: [PATCH] Figured out the accepted DateType formats --- tests/unit/test_types.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_types.py b/tests/unit/test_types.py index 06e143ad..0a781e74 100644 --- a/tests/unit/test_types.py +++ b/tests/unit/test_types.py @@ -93,11 +93,10 @@ class TypeTests(unittest.TestCase): Test cassandra.cqltypes.DateType() construction """ - pass - # TODO: Figure out the required format here - # date_string = str(datetime.datetime.now().strftime('%s.%f')) - # print date_string - # print cassandra.cqltypes.DateType(date_string) + # Ensure all formats can be parsed, without exception + for format in cassandra.cqltypes.cql_time_formats: + date_string = str(datetime.datetime.now().strftime(format)) + cassandra.cqltypes.DateType(date_string) def test_cql_typename(self): """