@mock.patch('socket.socket')
def test_verify_port(self, fake_socket):
    s = mock.MagicMock()
    fake_socket.return_value = s
    serial._verify_port('127.0.0.1', 10)
    s.bind.assert_called_once_with(('127.0.0.1', 10))
@mock.patch('socket.socket')
def test_verify_port(self, fake_socket):
    s = mock.MagicMock()
    fake_socket.return_value = s
    serial._verify_port('127.0.0.1', 10)
    s.bind.assert_called_once_with(('127.0.0.1', 10))