'Test setup with invalid port.'

@patch('socket.socket')
@patch('homeassistant.components.graphite.GraphiteFeeder')
def test_config_port(self, mock_gf, mock_socket):

    config = {'graphite': {'host': 'foo', 'port': 2003}}
    self.assertTrue(setup_component(self.hass, graphite.DOMAIN, config))
    self.assertTrue(mock_gf.called)
    self.assertEqual(mock_socket.call_count, 1)
    self.assertEqual(mock_socket.call_args, mock.call(socket.AF_INET, socket.SOCK_STREAM))
