<s> from __future__ import absolute_import , unicode_literals <EOL> from kombu import transport <EOL> from kombu . tests . case import Case , Mock , patch <EOL> class test_supports_librabbitmq ( Case ) : <EOL> def test_eventlet ( self ) : <EOL> with patch ( '<STR_LIT>' ) as de : <EOL> de . return_value = '<STR_LIT>' <EOL> self . assertFalse ( transport . supports_librabbitmq ( ) ) <EOL> class test_transport ( Case ) : <EOL> def test_resolve_transport ( self ) : <EOL> from kombu . transport . memory import Transport <EOL> self . assertIs ( transport . resolve_transport ( <EOL> '<STR_LIT>' ) , <EOL> Transport ) <EOL> self . assertIs ( transport . resolve_transport ( Transport ) , Transport ) <EOL> def test_resolve_transport_alias_callable ( self ) : <EOL> m = transport . TRANSPORT_ALIASES [ '<STR_LIT>' ] = Mock ( name = '<STR_LIT>' ) <EOL> try : <EOL> transport . resolve_transport ( '<STR_LIT>' ) <EOL> m . assert_called_with ( ) <EOL> finally : <EOL> transport . TRANSPORT_ALIASES . pop ( '<STR_LIT>' ) <EOL> def test_resolve_transport_alias ( self ) : <EOL> self . assertTrue ( transport . resolve_transport ( '<STR_LIT>' ) ) <EOL> class test_transport_ghettoq ( Case ) : <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_compat ( self , warn ) : <EOL> x = transport . _ghettoq ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( x ( ) , '<STR_LIT>' ) <EOL> warn . assert_called ( ) </s>
