def setUp(self): self.connection = self._create_connection() channelImplMock = mock.Mock(spec=ChannelTemplate, is_closing=False, is_closed=False, is_open=True) self.obj = blocking_connection.BlockingChannel(channelImplMock, self.connection)
def setUp(self): self.connection = self._create_connection() with mock.patch(BLOCKING_CHANNEL + '.open') as _open: self.obj = blocking_connection.BlockingChannel(self.connection, 1) self._open = _open