#NEWLINE# def test_new_callable_inherit_non_mock( self ) : #NEWLINE# #INDENT# class NotAMock ( object ) : #NEWLINE# #INDENT# def __init__( self , spec ) : #NEWLINE# #INDENT# self . spec = spec #NEWLINE# #UNINDENT# #UNINDENT# p = patch ( foo_name , new_callable = NotAMock , spec = True ) #NEWLINE# m = p . start ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . assertTrue ( is_instance ( m , NotAMock ) ) #NEWLINE# self . assertRaises ( AttributeError , getattr , m , 'return_value' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# p . stop ( ) #NEWLINE# #UNINDENT# self . assertEqual ( p . spec , Foo )