1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
"""
Tests for pika.adapters.tornado_connection
"""
try:
from tornado import ioloop
except ImportError:
ioloop = None
import mock
try:
import unittest2 as unittest
except ImportError:
import unittest
try:
from pika.adapters import tornado_connection
except ImportError:
tornado_connection = None
class TornadoConnectionTests(unittest.TestCase):
@unittest.skipIf(ioloop is None, 'requires Tornado')
@mock.patch('pika.adapters.base_connection.BaseConnection.__init__')
def test_tornado_connection_call_parent(self, mock_init):
obj = tornado_connection.TornadoConnection()
mock_init.called_once_with(None, None, False)
|