Skip to content

Commit

Permalink
Merge pull request #618 from bmbouter/fixes-qpid-tests-so-all-tests-r…
Browse files Browse the repository at this point in the history
…un-3.0

Removes some Qpid tests causing other test skips
  • Loading branch information
bmbouter committed Aug 9, 2016
2 parents 013dddb + 3691398 commit 55973dd
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions kombu/tests/transport/test_qpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1747,20 +1747,6 @@ def test_transport_verify_pre_kombu_3_0_exception_labels(self):
@disable_runtime_dependency_check
class TestTransportRegisterWithEventLoop(Case):

def setUp(self):
self.patch_a = patch(QPID_MODULE + '.os')
self.mock_os = self.patch_a.start()
self.mock_r = 1
self.mock_w = 2
self.mock_os.pipe.return_value = self.mock_r, self.mock_w

self.patch_b = patch(QPID_MODULE + '.fcntl')
self.mock_fcntl = self.patch_b.start()

def tearDown(self):
self.patch_a.stop()
self.patch_b.stop()

def test_transport_register_with_event_loop_calls_add_reader(self):
transport = Transport(Mock())
mock_connection = Mock()
Expand All @@ -1770,28 +1756,6 @@ def test_transport_register_with_event_loop_calls_add_reader(self):
transport.r, transport.on_readable, mock_connection, mock_loop,
)

def test_transport___init___calls_os_pipe(self):
transport = Transport(Mock())
transport.register_with_event_loop(Mock(), Mock())
self.mock_os.pipe.assert_called_once_with()

def test_transport___init___saves_os_pipe_file_descriptors(self):
transport = Transport(Mock())
mock_connection = Mock()
mock_loop = Mock()
transport.register_with_event_loop(mock_connection, mock_loop)
self.assertIs(transport.r, self.mock_r)
self.assertIs(transport._w, self.mock_w)

def test_transport___init___sets_non_blocking_behavior_on_r_fd(self):
transport = Transport(Mock())
mock_connection = Mock()
mock_loop = Mock()
transport.register_with_event_loop(mock_connection, mock_loop)
self.mock_fcntl.fcntl.assert_called_once_with(
self.mock_r, self.mock_fcntl.F_SETFL, self.mock_os.O_NONBLOCK,
)


@case_no_python3
@case_no_pypy
Expand Down

0 comments on commit 55973dd

Please sign in to comment.