Added support to language codes on Weather Underground (#4815)

* Added supported to language codes to Weather Underground

* Removed unecessary None assigments
This commit is contained in:
Marcelo Moreira de Mello authored and Paulus Schoutsen committed 2016-12-11 15:43:42 -08:00
1 parent 2708e193ec
commit 4d2480bbd1
2 files changed
+41 -14

No files matched your search

+11 -9
View File
@@ -23,6 +23,16 @@ VALID_CONFIG = {
]
}
INVALID_CONFIG = {
'platform': 'wunderground',
'api_key': 'BOB',
'pws_id': 'bar',
'lang': 'foo',
'monitored_conditions': [
'weather', 'feelslike_c', 'alerts'
]
}
FEELS_LIKE = '40'
WEATHER = 'Clear'
HTTPS_ICON_URL = 'https://icons.wxug.com/i/c/k/clear.gif'
@@ -128,17 +138,9 @@ class TestWundergroundSetup(unittest.TestCase):
self.assertTrue(
wunderground.setup_platform(self.hass, VALID_CONFIG,
self.add_devices, None))
invalid_config = {
'platform': 'wunderground',
'api_key': 'BOB',
'pws_id': 'bar',
'monitored_conditions': [
'weather', 'feelslike_c', 'alerts'
]
}
self.assertTrue(
wunderground.setup_platform(self.hass, invalid_config,
wunderground.setup_platform(self.hass, INVALID_CONFIG,
self.add_devices, None))
@unittest.mock.patch('requests.get', side_effect=mocked_requests_get)