Removed the google home warning from emulated_hue (#13436)
* Removed the google home warning from emulated_hue * Update test_init.py * Update test_init.py
This commit is contained in:
parent
f3ccbda054
commit
2d2e8034d6
2 changed files with 1 additions and 19 deletions
|
@ -158,10 +158,6 @@ class Config(object):
|
|||
"Listen port not specified, defaulting to %s",
|
||||
self.listen_port)
|
||||
|
||||
if self.type == TYPE_GOOGLE and self.listen_port != 80:
|
||||
_LOGGER.warning("When targeting Google Home, listening port has "
|
||||
"to be port 80")
|
||||
|
||||
# Get whether or not UPNP binds to multicast address (239.255.255.250)
|
||||
# or to the unicast address (host_ip_addr)
|
||||
self.upnp_bind_multicast = conf.get(
|
||||
|
|
|
@ -3,7 +3,7 @@ import json
|
|||
|
||||
from unittest.mock import patch, Mock, mock_open
|
||||
|
||||
from homeassistant.components.emulated_hue import Config, _LOGGER
|
||||
from homeassistant.components.emulated_hue import Config
|
||||
|
||||
|
||||
def test_config_google_home_entity_id_to_number():
|
||||
|
@ -112,17 +112,3 @@ def test_config_alexa_entity_id_to_number():
|
|||
|
||||
entity_id = conf.number_to_entity_id('light.test')
|
||||
assert entity_id == 'light.test'
|
||||
|
||||
|
||||
def test_warning_config_google_home_listen_port():
|
||||
"""Test we warn when non-default port is used for Google Home."""
|
||||
with patch.object(_LOGGER, 'warning') as mock_warn:
|
||||
Config(None, {
|
||||
'type': 'google_home',
|
||||
'host_ip': '123.123.123.123',
|
||||
'listen_port': 8300
|
||||
})
|
||||
|
||||
assert mock_warn.called
|
||||
assert mock_warn.mock_calls[0][1][0] == \
|
||||
"When targeting Google Home, listening port has to be port 80"
|
||||
|
|
Loading…
Add table
Reference in a new issue