#NEWLINE# def test_handles_product_deletion_gracefully( self ) : #NEWLINE# #INDENT# product = product . line . product #NEWLINE# product . delete ( ) #NEWLINE# line = Line . objects . get ( pk = self . line . pk ) #NEWLINE# self . assertIsNone ( line . product ) #NEWLINE# self . assertIsNone ( line . stockrecord ) #NEWLINE# self . assertEqual ( product . title , line . title ) #NEWLINE# self . assertEqual ( product . upc , line . upc )