def test_datetime_tz(self): """ Normal datetime fields add UTC timezone """ field = Field(data_type=datetime) dt = field.ddb_load(1432828089.027812) self.assertEqual(dt.tzinfo, UTC)
def test_naive_datetime(self): """ Naive datetime fields don't add timezone """ field = Field(data_type=DateTimeType(naive=True)) dt = field.ddb_load(1432828089.027812) self.assertIsNone(dt.tzinfo)