def test_is_forecast(self):
     self.assertFalse(self.__test_instance.is_forecast())
     in_a_year = datetime_to_UNIXtime(datetime.utcnow()) + 31536000
     uvindex = SO2Index(in_a_year, self.__test_location,
                        self.__test_interval, [],
                        self.__test_reception_time)
     self.assertTrue(uvindex.is_forecast())
예제 #2
0
 def test_datetime_to_UNIXtime(self):
     date = datetime(2013, 9, 19, 12, 0, 0, 0, timezone.utc)
     expected = 1379592000
     self.assertEqual(formatting.datetime_to_UNIXtime(date), expected)
예제 #3
0
 def test_datetime_to_UNIXtime(self):
     date = datetime(2013, 9, 19, 12, 0, tzinfo=formatting.UTC())
     expected = 1379592000
     self.assertEqual(formatting.datetime_to_UNIXtime(date), expected)