@mock.patch('socket.socket')
    def test_send_to_graphite(self, mock_socket):
        self.gf._send_to_graphite('foo')
        mock_socket.assert_called_once_with(socket.AF_INET,
                                            socket.SOCK_STREAM)
        sock = mock_socket.return_value
        sock.connect.assert_called_once_with(('foo', 123))
        sock.sendall.assert_called_once_with('foo'.encode('ascii'))
        sock.send.assert_called_once_with('\n'.encode('ascii'))
        sock.close.assert_called_once_with()
Get the similar terms of a given term
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/test_graphite.py/TestGraphite.test_send_to_graphite--crossover with--dataset/ETHPy150Open cortical-io/python-client-sdk/cortical/termsApi.py/TermsApi.getSimilarTerms