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())
def test_is_forecast(self): self.assertFalse(self.__test_instance.is_forecast()) in_a_year = _datetime_to_UNIXtime(datetime.utcnow()) + 31536000 uvindex = NO2Index(in_a_year, self.__test_location, self.__test_interval, [], self.__test_reception_time) self.assertTrue(uvindex.is_forecast())
def test_datetime_to_UNIXtime(self): date = datetime(2013, 9, 19, 12, 0) expected = 1379592000 self.assertEqual(timeformatutils._datetime_to_UNIXtime(date), expected)
def test_datetime_to_UNIXtime(self): date = datetime(2013, 9, 19, 12, 0) expected = 1379592000 self.assertEqual(timeformatutils._datetime_to_UNIXtime(date), expected)