def test_resolve_transport_alias_callable(self):
     m = transport.TRANSPORT_ALIASES['George'] = Mock(name='lazyalias')
     try:
         transport.resolve_transport('George')
         m.assert_called_with()
     finally:
         transport.TRANSPORT_ALIASES.pop('George')
Beispiel #2
0
 def test_resolve_transport_alias_callable(self):
     m = transport.TRANSPORT_ALIASES['George'] = Mock(name='lazyalias')
     try:
         transport.resolve_transport('George')
         m.assert_called_with()
     finally:
         transport.TRANSPORT_ALIASES.pop('George')
 def test_resolve_transport(self):
     from kombu.transport.memory import Transport
     assert transport.resolve_transport(
         'kombu.transport.memory:Transport') is Transport
     assert transport.resolve_transport(Transport) is Transport
Beispiel #4
0
 def test_resolve_transport_when_callable(self):
     self.assertTupleEqual(
         transport.resolve_transport(
             lambda: "kombu.transport.memory.Transport"),
         ("kombu.transport.memory", "Transport"))
Beispiel #5
0
 def test_resolve_transport__no_class_name(self):
     with self.assertRaises(KeyError):
         transport.resolve_transport("nonexistant")
Beispiel #6
0
 def test_resolve_transport_when_callable(self):
     self.assertTupleEqual(
         transport.resolve_transport(
             lambda: 'kombu.transport.memory.Transport'),
         ('kombu.transport.memory', 'Transport'))
Beispiel #7
0
 def test_resolve_transport_alias(self):
     self.assertTrue(transport.resolve_transport('pyamqp'))
Beispiel #8
0
 def test_resolve_transport_alias(self):
     assert transport.resolve_transport('pyamqp')
 def test_resolve_transport_when_callable(self):
     self.assertTupleEqual(transport.resolve_transport(
             lambda: "kombu.transport.memory.Transport"),
             ("kombu.transport.memory", "Transport"))
 def test_resolve_transport__no_class_name(self):
     with self.assertRaises(KeyError):
         transport.resolve_transport("nonexistant")
Beispiel #11
0
 def test_resolve_transport_when_callable(self):
     self.assertTupleEqual(transport.resolve_transport(
             lambda: 'kombu.transport.memory.Transport'),
             ('kombu.transport.memory', 'Transport'))
Beispiel #12
0
 def test_resolve_transport_when_callable(self):
     from kombu.transport.memory import Transport
     self.assertIs(
         transport.resolve_transport('kombu.transport.memory:Transport'),
         Transport)
 def test_resolve_transport_alias(self):
     self.assertTrue(transport.resolve_transport('pyamqp'))
 def test_resolve_transport(self):
     from kombu.transport.memory import Transport
     self.assertIs(transport.resolve_transport(
         'kombu.transport.memory:Transport'),
         Transport)
     self.assertIs(transport.resolve_transport(Transport), Transport)
Beispiel #15
0
 def test_resolve_transport_when_callable(self):
     from kombu.transport.memory import Transport
     self.assertIs(transport.resolve_transport(
         'kombu.transport.memory:Transport'),
         Transport)
Beispiel #16
0
 def test_resolve_transport(self):
     from kombu.transport.memory import Transport
     self.assertIs(transport.resolve_transport(
         'kombu.transport.memory:Transport'),
         Transport)
     self.assertIs(transport.resolve_transport(Transport), Transport)
 def test_resolve_transport_alias(self):
     assert transport.resolve_transport('pyamqp')
Beispiel #18
0
 def test_resolve_transport(self):
     from kombu.transport.memory import Transport
     assert transport.resolve_transport(
         'kombu.transport.memory:Transport') is Transport
     assert transport.resolve_transport(Transport) is Transport