#NEWLINE# def test_shortcut_view_with_broken_get_absolute_url( self ) : #NEWLINE# #INDENT# "\n        Check that the shortcut view does not catch an AttributeError raised\n        by the model's get_absolute_url method.\n        Refs #8997.\n        " #NEWLINE# request = HttpRequest ( ) #NEWLINE# request . META = { #NEWLINE# #INDENT# 'SERVER_NAME' : 'Example.com' , #NEWLINE# 'SERVER_PORT' : '80' , #NEWLINE# #UNINDENT# } #NEWLINE# user_ct = ContentType . objects . get_for_model ( FooWithBrokenAbsoluteUrl ) #NEWLINE# obj = FooWithBrokenAbsoluteUrl . objects . create ( name = 'john' ) #NEWLINE# with self . assertRaises ( AttributeError ) : #NEWLINE# #INDENT# shortcut ( request , self . id , obj . id )