@@ -194,7 +194,8 @@ def test_lookup_single_key_empty_response(self):
194194 'lookup' ,
195195 ])
196196 http = conn ._http = Http ({'status' : '200' }, rsp_pb .SerializeToString ())
197- self .assertEqual (conn .lookup (DATASET_ID , key_pb ), None )
197+ found = conn .lookup (DATASET_ID , [key_pb ])
198+ self .assertEqual (len (found ), 0 )
198199 cw = http ._called_with
199200 self ._verifyProtobufCall (cw , URI , conn )
200201 rq_class = datastore_pb .LookupRequest
@@ -220,7 +221,8 @@ def test_lookup_single_key_empty_response_w_eventual(self):
220221 'lookup' ,
221222 ])
222223 http = conn ._http = Http ({'status' : '200' }, rsp_pb .SerializeToString ())
223- self .assertEqual (conn .lookup (DATASET_ID , key_pb , eventual = True ), None )
224+ found = conn .lookup (DATASET_ID , [key_pb ], eventual = True )
225+ self .assertEqual (len (found ), 0 )
224226 cw = http ._called_with
225227 self ._verifyProtobufCall (cw , URI , conn )
226228 rq_class = datastore_pb .LookupRequest
@@ -258,8 +260,8 @@ def test_lookup_single_key_empty_response_w_transaction(self):
258260 'lookup' ,
259261 ])
260262 http = conn ._http = Http ({'status' : '200' }, rsp_pb .SerializeToString ())
261- found = conn .lookup (DATASET_ID , key_pb , transaction_id = TRANSACTION )
262- self .assertEqual (found , None )
263+ found = conn .lookup (DATASET_ID , [ key_pb ] , transaction_id = TRANSACTION )
264+ self .assertEqual (len ( found ), 0 )
263265 cw = http ._called_with
264266 self ._verifyProtobufCall (cw , URI , conn )
265267 rq_class = datastore_pb .LookupRequest
@@ -289,7 +291,7 @@ def test_lookup_single_key_nonempty_response(self):
289291 'lookup' ,
290292 ])
291293 http = conn ._http = Http ({'status' : '200' }, rsp_pb .SerializeToString ())
292- found = conn .lookup (DATASET_ID , key_pb )
294+ found , = conn .lookup (DATASET_ID , [ key_pb ] )
293295 self .assertEqual (found .key .path_element [0 ].kind , 'Kind' )
294296 self .assertEqual (found .key .path_element [0 ].id , 1234 )
295297 cw = http ._called_with
0 commit comments