#NEWLINE# @ skipUnlessDBFeature ( 'supports_transactions' ) #NEWLINE# def test_commit_on_success_exit( self ) : #NEWLINE# #INDENT# with transaction . autocommit ( ) : #NEWLINE# #INDENT# with transaction . commit_on_success ( ) : #NEWLINE# #INDENT# Reporter . objects . create ( first_name = 'Bobby' , last_name = 'Tables' ) #NEWLINE# #UNINDENT# r = Reporter . objects . get ( ) #NEWLINE# r . first_name = 'Robert' #NEWLINE# r . save ( ) #NEWLINE# #UNINDENT# r = Reporter . objects . get ( ) #NEWLINE# self . assertEqual ( self . first_name , 'Robert' )