#NEWLINE# def test_basic( self ) : #NEWLINE# #INDENT# class Foo ( object ) : #NEWLINE# #INDENT# def __call__( self , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# def bar( * args , **kargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . assertRaises ( TypeError , adapters . register_adapter , 'foo' , 1 ) #NEWLINE# self . assertRaises ( TypeError , adapters . register_adapter , 'foo' , 'asdf' ) #NEWLINE# adapters . register_adapter ( 'foo' , Foo ( ) ) #NEWLINE# adapters . register_adapter ( 'foo' , self ) #NEWLINE# adapters . register_adapter ( 'foo' , ( lambda x : x ) )