#NEWLINE# def test_delete_entity_removes_gazette_item( self ) : #NEWLINE# #INDENT# entity = EntityFactory ( ) #NEWLINE# entity . gazette = GazetteItemFactory ( ) #NEWLINE# entity . save ( ) #NEWLINE# gazette_id = entity . gazette . id #NEWLINE# self . assertIsNotNone ( GazetteItem . objects . get ( pk = entity ) ) #NEWLINE# entity . delete ( ) #NEWLINE# with self . assertRaises ( ObjectDoesNotExist ) : #NEWLINE# #INDENT# GazetteItem . objects . get ( pk = gazette_id )