コード例 #1
0
 def test_get_weather_data(self):
     config = ConfigController()
     apiTokenFromConfig = config.get_open_weather_token()
     testApiUrl = "https://api.openweathermap.org/data/2.5/weather?q=London,GB&APPID=" + apiTokenFromConfig
     data = Weather.get_weather_data(self, testApiUrl)
     assert 'weather' in data
     assert 'main' in data
     assert 'wind' in data
     assert 'clouds' in data
     assert 'sys' in data
     assert 'coord' in data
コード例 #2
0
 def test_get_open_weather_token(self):
     config = ConfigController()
     self.assertIsInstance(config.get_open_weather_token(), str)