Ejemplo n.º 1
0
 def test_invalid_param(self):
     client = WeatherApi(self.api_key)
     result = client.search_date_range(self.start_date, self.end_date, "")
     self.assertEqual(result['weather_observations'][0]['error'],
                      "you must supply a location query")
Ejemplo n.º 2
0
 def test_invalid_key(self):
     client = WeatherApi("test")
     result = client.search_date_range(self.start_date, self.end_date,
                                       self.zip_code)
     self.assertEqual(result['weather_observations'][0]['error'],
                      "this key does not exist")
Ejemplo n.º 3
0
 def test_search_date_range(self):
     client = WeatherApi(self.api_key)
     print(
         client.search_date_range(self.start_date, self.end_date,
                                  self.zip_code))
Ejemplo n.º 4
0
 def test_invalid_param(self):
     client = WeatherApi(self.api_key)
     result = client.search_date_range(self.start_date, self.end_date, "")
     self.assertEqual(result['weather_observations'][0]['error'], "you must supply a location query")
Ejemplo n.º 5
0
 def test_invalid_key(self):
     client = WeatherApi("test")
     result = client.search_date_range(self.start_date, self.end_date, self.zip_code)
     self.assertEqual(result['weather_observations'][0]['error'], "this key does not exist")
Ejemplo n.º 6
0
 def test_search_date_range(self):
     client = WeatherApi(self.api_key)
     print(client.search_date_range(self.start_date, self.end_date, self.zip_code))