'Connect to the configured host and port.'

@patch('socket.socket')
@patch('select.select', return_value=(True, False, False))
def test_update_connects_to_host_and_port(self, mock_select, mock_socket):

    tcp.TcpSensor(self.hass, TEST_CONFIG['sensor'])
    mock_socket = mock_socket().__enter__()
    assert (mock_socket.connect.mock_calls[0][1] == ((TEST_CONFIG['sensor'][tcp.CONF_HOST], TEST_CONFIG['sensor'][tcp.CONF_PORT]),))
