#NEWLINE# def test_put_entity_w_partial_key( self ) : #NEWLINE# #INDENT# _PROJECT = 'PROJECT' #NEWLINE# _PROPERTIES = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } #NEWLINE# connection = _Connection ( ) #NEWLINE# client = _Client ( self , connection ) #NEWLINE# batch = self . _makeOne ( client ) #NEWLINE# entity = _Entity ( _PROPERTIES ) #NEWLINE# key = entity . key = _Key ( _PROJECT ) #NEWLINE# key . _id = None #NEWLINE# batch . put ( entity ) #NEWLINE# mutated_entity = _mutated_pb ( self , batch . mutations , 'insert' ) #NEWLINE# self . assertEqual ( mutated_entity . key , key . _key ) #NEWLINE# self . assertEqual ( batch . _partial_key_entities , [ entity ] )