Exemplo n.º 1
0
 def test_weather_item_type(self):
     testee = Settings()
     self.assertEqual(WeatherItemType.SUMMARY, testee.get_weather_item_type())
     testee.next_weather_item_type()
     self.assertEqual(WeatherItemType.FORECAST, testee.get_weather_item_type())
     testee.previous_weather_item_type()
     self.assertEqual(WeatherItemType.SUMMARY, testee.get_weather_item_type())
 def __get_weather_item(self, weather_item_type):
     settings = Settings()
     while settings.get_weather_item_type() != weather_item_type:
         settings.next_weather_item_type()
     return WeatherItemFactory(ClientRaw(self.__gen_populated_client_raw_str()), settings).get_weather_item()