#NEWLINE# def test_lookup_multiple_keys_empty_response( self ) : #NEWLINE# #INDENT# from gcloud.datastore._generated import datastore_pb2 #NEWLINE# PROJECT = 'PROJECT' #NEWLINE# key_pb1 = self . _make_key_pb ( PROJECT ) #NEWLINE# key_pb2 = self . _make_key_pb ( PROJECT , id_ = 2345 ) #NEWLINE# rsp_pb = datastore_pb2 . LookupResponse ( ) #NEWLINE# conn = self . _makeOne ( ) #NEWLINE# URI = '/' . join ( [ conn . api_base_url , conn . API_VERSION , 'projects' , ( PROJECT + ':lookup' ) ] ) #NEWLINE# http = conn . _http = Http ( { #NEWLINE# #INDENT# 'status' : '200' , #NEWLINE# #UNINDENT# } , rsp_pb . SerializeToString ( ) ) #NEWLINE# ( found , missing , deferred ) = conn . lookup ( key_pb1 , [ key_pb1 , key_pb2 ] ) #NEWLINE# self . assertEqual ( len ( found ) , 0 ) #NEWLINE# self . assertEqual ( len ( missing ) , 0 ) #NEWLINE# self . assertEqual ( len ( deferred ) , 0 ) #NEWLINE# cw = http . _called_with #NEWLINE# self . _verifyProtobufCall ( cw , URI , conn ) #NEWLINE# rq_class = datastore_pb2 . LookupRequest #NEWLINE# request = rq_class ( ) #NEWLINE# request . ParseFromString ( cw [ 'body' ] ) #NEWLINE# keys = list ( request . keys ) #NEWLINE# self . assertEqual ( len ( keys ) , 2 ) #NEWLINE# self . assertEqual ( key_pb1 , keys [ 0 ] ) #NEWLINE# self . assertEqual ( key_pb2 , keys [ 1 ] )