#NEWLINE# def test_get_urls_throws_type_error( self ) : #NEWLINE# #INDENT# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# admin_instance = ModelAdmin2 ( BigThing , Admin2 ) #NEWLINE# admin_instance . views = [ views . AdminView ( None , None , None ) ] #NEWLINE# admin_instance . get_urls ( ) #NEWLINE# #UNINDENT# except TypeError as e : #NEWLINE# #INDENT# message = 'Cannot instantiate admin view "ModelAdmin2.None". The error that got raised was: \'NoneType\' object has no attribute \'as_view\'' #NEWLINE# self . assertEqual ( e . args [ 0 ] , message ) #NEWLINE# raise