#NEWLINE# def test_get_builtin_constructor( self ) : #NEWLINE# #INDENT# get_builtin_constructor = hashlib . __dict__ [ '__get_builtin_constructor' ] #NEWLINE# self . assertRaises ( ValueError , self , 'test' ) #NEWLINE# try : #NEWLINE# #INDENT# import _md5 #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# sys . modules [ '_md5' ] = None #NEWLINE# try : #NEWLINE# #INDENT# self . assertRaises ( ValueError , get_builtin_constructor , 'md5' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# if ( '_md5' in locals ( ) ) : #NEWLINE# #INDENT# sys . modules [ '_md5' ] = _md5 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# del sys . modules [ '_md5' ] #NEWLINE# #UNINDENT# #UNINDENT# self . assertRaises ( TypeError , get_builtin_constructor , 3 )