def testWeatherConstructor(self): w = Weather(1, 2, 3, 4, '2000-12-31 20:00:00', 'cloudy') self.assertEqual(w.getTemperature(), 1) self.assertEqual(w.getFeelsLike(), 2) self.assertEqual(w.getMinTemp(), 3) self.assertEqual(w.getMaxTemp(), 4) self.assertEqual(w.getDt(), '2000-12-31 20:00:00') self.assertEqual(w.getWeatherState(), 'cloudy')
def EventMethods_Weather(self): weatherInfo = Weather() self.message('Beijing ' + weatherInfo.getUpdateTime() + '\n ' + str(weatherInfo.getTemperature()) + chr(4) + 'C RH:' + weatherInfo.getRH()) self.AutoRefreshMethod = 'EventMethods_5_1'