# Path: src/tests/common/unit/base.py
# class MercuryCommonUnitTest(unittest.TestCase):
#     """Base class for mercury-common unit tests."""
#     pass


import mock
import msgpack
import pytest
import zmq
from mercury.common.exceptions import MercuryClientException
from mercury.common import transport
from .base import MercuryCommonUnitTest
# Copyright 2017 Rackspace
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License");
#    you may not use this file except in compliance with the License.
#    You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.




@mock.patch.object(transport, 'get_ctx_and_connect_req_socket')
def test_full_req_transceiver(mock_get_ctx):
    ctx = mock.Mock(spec_set=zmq.Context)
    socket = ctx.socket.return_value

# Path: src/tests/common/unit/base.py
# class MercuryCommonUnitTest(unittest.TestCase):
#     """Base class for mercury-common unit tests."""
#     pass


# Path: src/tests/common/unit/test_transport.py
import mock
import msgpack
import pytest
import zmq
from mercury.common.exceptions import MercuryClientException
from mercury.common import transport
from .base import MercuryCommonUnitTest

# Copyright 2017 Rackspace
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License");
#    you may not use this file except in compliance with the License.
#    You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.




@mock.patch.object(transport, 'get_ctx_and_connect_req_socket')
def test_full_req_transceiver(mock_get_ctx):
    ctx = mock.Mock(spec_set=zmq.Context)
    socket = ctx.socket.return_value

    mock_get_ctx.return_value = ctx, socket