#NEWLINE# def test_update_single_transaction( self ) : #NEWLINE# #INDENT# obj = self . _make_object ( self . obj_fields [ 0 ] ) #NEWLINE# obj . create ( ) #NEWLINE# fields_to_update = self . get_updatable_fields ( self . obj_fields [ 1 ] ) #NEWLINE# if ( not fields_to_update ) : #NEWLINE# #INDENT# self . skipTest ( ( 'No updatable fields found in test class %r' % self . _test_class ) ) #NEWLINE# #UNINDENT# for ( key , val ) in fields_to_update . items ( ) : #NEWLINE# #INDENT# setattr ( obj , key , val ) #NEWLINE# #UNINDENT# with mock . patch ( SQLALCHEMY_COMMIT ) as mock_commit : #NEWLINE# #INDENT# obj . update ( ) #NEWLINE# #UNINDENT# self . assertEqual ( 1 , mock_commit . call_count )