#NEWLINE# def test_allocate_ids_empty( self ) : #NEWLINE# #INDENT# from gcloud.datastore._generated import datastore_pb2 #NEWLINE# PROJECT = 'PROJECT' #NEWLINE# rsp_pb = datastore_pb2 . AllocateIdsResponse ( ) #NEWLINE# conn = self . _makeOne ( ) #NEWLINE# URI = '/' . join ( [ conn . api_base_url , conn . API_VERSION , 'projects' , ( PROJECT + ':allocateIds' ) ] ) #NEWLINE# http = conn . _http = Http ( { #NEWLINE# #INDENT# 'status' : '200' , #NEWLINE# #UNINDENT# } , rsp_pb . SerializeToString ( ) ) #NEWLINE# self . assertEqual ( conn . allocate_ids ( PROJECT , [ ] ) , [ ] ) #NEWLINE# cw = http . _called_with #NEWLINE# self . _verifyProtobufCall ( cw , URI , conn ) #NEWLINE# rq_class = datastore_pb2 . AllocateIdsRequest #NEWLINE# request = rq_class ( ) #NEWLINE# request . ParseFromString ( cw [ 'body' ] ) #NEWLINE# self . assertEqual ( list ( request . keys ) , [ ] )