class TestWeatherClient(unittest.TestCase): def setUp(self): self.client = OpenWeatherMapClient() def test_loading_forecast(self): data = self.client.get_daily_forecast('lviv') self.assertIsInstance(data, dict) self.assertEquals(data['city']['name'], 'Lviv') self.assertEquals(data['city']['country'], 'UA') self.assertEquals(len(data['list']), 14)
def setUp(self): self.client = OpenWeatherMapClient()