mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Remove print lines
This commit is contained in:
parent
41f84d9e20
commit
2b8e2a3d36
@ -42,8 +42,6 @@ def mocked_requests_get(*args, **kwargs):
|
|||||||
return self.json_data
|
return self.json_data
|
||||||
|
|
||||||
if str(args[0]).startswith('http://api.wunderground.com/api/foo/'):
|
if str(args[0]).startswith('http://api.wunderground.com/api/foo/'):
|
||||||
# Return valid response
|
|
||||||
print('VALID RESPONSE')
|
|
||||||
return MockResponse({
|
return MockResponse({
|
||||||
"response": {
|
"response": {
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
@ -65,8 +63,6 @@ def mocked_requests_get(*args, **kwargs):
|
|||||||
}
|
}
|
||||||
}, 200)
|
}, 200)
|
||||||
else:
|
else:
|
||||||
# Return invalid api key
|
|
||||||
print('INVALID RESPONSE')
|
|
||||||
return MockResponse({
|
return MockResponse({
|
||||||
"response": {
|
"response": {
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
@ -104,11 +100,9 @@ class TestWundergroundSetup(unittest.TestCase):
|
|||||||
@unittest.mock.patch('requests.get', side_effect=mocked_requests_get)
|
@unittest.mock.patch('requests.get', side_effect=mocked_requests_get)
|
||||||
def test_setup(self, req_mock):
|
def test_setup(self, req_mock):
|
||||||
"""Test that the component is loaded if passed in PSW Id."""
|
"""Test that the component is loaded if passed in PSW Id."""
|
||||||
print('1')
|
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
wunderground.setup_platform(self.hass, VALID_CONFIG_PWS,
|
wunderground.setup_platform(self.hass, VALID_CONFIG_PWS,
|
||||||
self.add_devices, None))
|
self.add_devices, None))
|
||||||
print('2')
|
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
wunderground.setup_platform(self.hass, VALID_CONFIG,
|
wunderground.setup_platform(self.hass, VALID_CONFIG,
|
||||||
self.add_devices,
|
self.add_devices,
|
||||||
@ -131,7 +125,6 @@ class TestWundergroundSetup(unittest.TestCase):
|
|||||||
"""Test the wundergroun sensor class and methods."""
|
"""Test the wundergroun sensor class and methods."""
|
||||||
wunderground.setup_platform(self.hass, VALID_CONFIG, self.add_devices,
|
wunderground.setup_platform(self.hass, VALID_CONFIG, self.add_devices,
|
||||||
None)
|
None)
|
||||||
print(str(self.DEVICES))
|
|
||||||
for device in self.DEVICES:
|
for device in self.DEVICES:
|
||||||
self.assertTrue(str(device.name).startswith('PWS_'))
|
self.assertTrue(str(device.name).startswith('PWS_'))
|
||||||
if device.name == 'PWS_weather':
|
if device.name == 'PWS_weather':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user