Esempio n. 1
0
 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)
Esempio n. 2
0
 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)