'Return the name if set in the configuration.'

@patch('homeassistant.components.sensor.tcp.TcpSensor.update')
def test_name(self, mock_update):

    sensor = tcp.TcpSensor(self.hass, TEST_CONFIG['sensor'])
    assert (sensor.name == TEST_CONFIG['sensor'][tcp.CONF_NAME])
