Example #1
0
 def test_actualize(self):
     weathers = [
         Weather(1378459200, 1378496400, 1378449600, 67, {"all": 20},
                 {"all": 0}, {
                     "deg": 252.002,
                     "speed": 1.100
                 }, 57, {
                     "press": 1030.119,
                     "sea_level": 1038.589
                 }, {
                     "temp": 294.199,
                     "temp_kf": -1.899,
                     "temp_max": 296.098,
                     "temp_min": 294.199
                 }, "Clouds", "Overcast clouds", 804, "04d", 1000, 300.0,
                 298.0, 296.0),
         # will this time ever be reached?
         Weather(9999999999, 1378496480, 1378449510, 23, {"all": 10},
                 {"all": 0}, {
                     "deg": 103.4,
                     "speed": 4.2
                 }, 12, {
                     "press": 1070.119,
                     "sea_level": 1078.589
                 }, {
                     "temp": 297.199,
                     "temp_kf": -1.899,
                     "temp_max": 299.0,
                     "temp_min": 295.6
                 }, "Clear", "Sky is clear", 804, "02d", 1000, 300.0, 298.0,
                 296.0)
     ]
     f = Forecast("daily", self.__test_reception_time, self.__test_location,
                  weathers)
     self.assertEqual(2, len(f))
     f.actualize()
     self.assertEqual(1, len(f))