#NEWLINE# def test__update_retval( self ) : #NEWLINE# #INDENT# self . db . col . save ( { #NEWLINE# #INDENT# 'a' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# retval = self . db . col . update ( { #NEWLINE# #INDENT# 'a' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'b' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertIsInstance ( retval , dict ) #NEWLINE# self . assertIsInstance ( retval [ text_type ( 'connectionId' ) ] , int ) #NEWLINE# self . assertIsNone ( retval [ text_type ( 'err' ) ] ) #NEWLINE# self . assertEqual ( self [ text_type ( 'n' ) ] , 1 ) #NEWLINE# self . assertTrue ( retval [ text_type ( 'updatedExisting' ) ] ) #NEWLINE# self . assertEqual ( retval [ 'ok' ] , 1.0 ) #NEWLINE# self . assertEqual ( self . db . col . update ( { #NEWLINE# #INDENT# 'bla' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'bla' : 2 , #NEWLINE# #UNINDENT# } ) [ 'n' ] , 0 )