@mock.patch.object(rpc, 'RequestContextSerializer')
@mock.patch.object(rpc, 'BackingOffClient')
def test_get_client(self, mock_client, mock_ser):
    rpc.TRANSPORT = mock.Mock()
    tgt = mock.Mock()
    ser = mock.Mock()
    mock_client.return_value = 'client'
    mock_ser.return_value = ser
    client = rpc.get_client(tgt, version_cap='1.0', serializer='foo')
    mock_ser.assert_called_once_with('foo')
    mock_client.assert_called_once_with(rpc.TRANSPORT, tgt, version_cap='1.0', serializer=ser)
    self.assertEqual('client', client)
@mock.patch.object(rpc, 'RequestContextSerializer')
@mock.patch.object(rpc, 'BackingOffClient')
def test_get_client(self, mock_client, mock_ser):
    rpc.TRANSPORT = mock.Mock()
    tgt = mock.Mock()
    ser = mock.Mock()
    mock_client.return_value = 'client'
    mock_ser.return_value = ser
    client = rpc.get_client(tgt, version_cap='1.0', serializer='foo')
    mock_ser.assert_called_once_with('foo')
    mock_client.assert_called_once_with(rpc.TRANSPORT, tgt, version_cap='1.0', serializer=ser)
    self.assertEqual('client', client)