@@ -139,7 +139,7 @@ def _make_key_pb(self, project, id_=1234):
139
139
return Key (* path_args , project = project ).to_protobuf ()
140
140
141
141
def _make_query_pb (self , kind ):
142
- from google .cloud .grpc .datastore .v1 import query_pb2
142
+ from google .cloud .proto .datastore .v1 import query_pb2
143
143
144
144
pb = query_pb2 .Query ()
145
145
pb .kind .add ().name = kind
@@ -253,7 +253,7 @@ def test_build_api_url_w_explicit_base_version(self):
253
253
URI )
254
254
255
255
def test_lookup_single_key_empty_response (self ):
256
- from google .cloud .grpc .datastore .v1 import datastore_pb2
256
+ from google .cloud .proto .datastore .v1 import datastore_pb2
257
257
258
258
PROJECT = 'PROJECT'
259
259
key_pb = self ._make_key_pb (PROJECT )
@@ -281,7 +281,7 @@ def test_lookup_single_key_empty_response(self):
281
281
self .assertEqual (key_pb , keys [0 ])
282
282
283
283
def test_lookup_single_key_empty_response_w_eventual (self ):
284
- from google .cloud .grpc .datastore .v1 import datastore_pb2
284
+ from google .cloud .proto .datastore .v1 import datastore_pb2
285
285
286
286
PROJECT = 'PROJECT'
287
287
key_pb = self ._make_key_pb (PROJECT )
@@ -321,7 +321,7 @@ def test_lookup_single_key_empty_response_w_eventual_and_transaction(self):
321
321
eventual = True , transaction_id = TRANSACTION )
322
322
323
323
def test_lookup_single_key_empty_response_w_transaction (self ):
324
- from google .cloud .grpc .datastore .v1 import datastore_pb2
324
+ from google .cloud .proto .datastore .v1 import datastore_pb2
325
325
326
326
PROJECT = 'PROJECT'
327
327
TRANSACTION = b'TRANSACTION'
@@ -352,8 +352,8 @@ def test_lookup_single_key_empty_response_w_transaction(self):
352
352
self .assertEqual (request .read_options .transaction , TRANSACTION )
353
353
354
354
def test_lookup_single_key_nonempty_response (self ):
355
- from google .cloud .grpc .datastore .v1 import datastore_pb2
356
- from google .cloud .grpc .datastore .v1 import entity_pb2
355
+ from google .cloud .proto .datastore .v1 import datastore_pb2
356
+ from google .cloud .proto .datastore .v1 import entity_pb2
357
357
358
358
PROJECT = 'PROJECT'
359
359
key_pb = self ._make_key_pb (PROJECT )
@@ -385,7 +385,7 @@ def test_lookup_single_key_nonempty_response(self):
385
385
self .assertEqual (key_pb , keys [0 ])
386
386
387
387
def test_lookup_multiple_keys_empty_response (self ):
388
- from google .cloud .grpc .datastore .v1 import datastore_pb2
388
+ from google .cloud .proto .datastore .v1 import datastore_pb2
389
389
390
390
PROJECT = 'PROJECT'
391
391
key_pb1 = self ._make_key_pb (PROJECT )
@@ -415,7 +415,7 @@ def test_lookup_multiple_keys_empty_response(self):
415
415
self .assertEqual (key_pb2 , keys [1 ])
416
416
417
417
def test_lookup_multiple_keys_w_missing (self ):
418
- from google .cloud .grpc .datastore .v1 import datastore_pb2
418
+ from google .cloud .proto .datastore .v1 import datastore_pb2
419
419
420
420
PROJECT = 'PROJECT'
421
421
key_pb1 = self ._make_key_pb (PROJECT )
@@ -450,7 +450,7 @@ def test_lookup_multiple_keys_w_missing(self):
450
450
self .assertEqual (key_pb2 , keys [1 ])
451
451
452
452
def test_lookup_multiple_keys_w_deferred (self ):
453
- from google .cloud .grpc .datastore .v1 import datastore_pb2
453
+ from google .cloud .proto .datastore .v1 import datastore_pb2
454
454
455
455
from google .cloud import _http as connection_module
456
456
from google .cloud .datastore ._http import _CLIENT_INFO
@@ -494,8 +494,8 @@ def test_lookup_multiple_keys_w_deferred(self):
494
494
self .assertEqual (key_pb2 , keys [1 ])
495
495
496
496
def test_run_query_w_eventual_no_transaction (self ):
497
- from google .cloud .grpc .datastore .v1 import datastore_pb2
498
- from google .cloud .grpc .datastore .v1 import query_pb2
497
+ from google .cloud .proto .datastore .v1 import datastore_pb2
498
+ from google .cloud .proto .datastore .v1 import query_pb2
499
499
500
500
project = 'PROJECT'
501
501
kind = 'Nonesuch'
@@ -534,8 +534,8 @@ def test_run_query_w_eventual_no_transaction(self):
534
534
self .assertEqual (request .read_options .transaction , b'' )
535
535
536
536
def test_run_query_wo_eventual_w_transaction (self ):
537
- from google .cloud .grpc .datastore .v1 import datastore_pb2
538
- from google .cloud .grpc .datastore .v1 import query_pb2
537
+ from google .cloud .proto .datastore .v1 import datastore_pb2
538
+ from google .cloud .proto .datastore .v1 import query_pb2
539
539
540
540
project = 'PROJECT'
541
541
kind = 'Nonesuch'
@@ -577,8 +577,8 @@ def test_run_query_wo_eventual_w_transaction(self):
577
577
self .assertEqual (request .read_options .transaction , transaction )
578
578
579
579
def test_run_query_w_eventual_and_transaction (self ):
580
- from google .cloud .grpc .datastore .v1 import datastore_pb2
581
- from google .cloud .grpc .datastore .v1 import query_pb2
580
+ from google .cloud .proto .datastore .v1 import datastore_pb2
581
+ from google .cloud .proto .datastore .v1 import query_pb2
582
582
583
583
PROJECT = 'PROJECT'
584
584
KIND = 'Nonesuch'
@@ -595,8 +595,8 @@ def test_run_query_w_eventual_and_transaction(self):
595
595
eventual = True , transaction_id = TRANSACTION )
596
596
597
597
def test_run_query_wo_namespace_empty_result (self ):
598
- from google .cloud .grpc .datastore .v1 import datastore_pb2
599
- from google .cloud .grpc .datastore .v1 import query_pb2
598
+ from google .cloud .proto .datastore .v1 import datastore_pb2
599
+ from google .cloud .proto .datastore .v1 import query_pb2
600
600
601
601
project = 'PROJECT'
602
602
kind = 'Nonesuch'
@@ -632,9 +632,9 @@ def test_run_query_wo_namespace_empty_result(self):
632
632
self .assertEqual (request .query , q_pb )
633
633
634
634
def test_run_query_w_namespace_nonempty_result (self ):
635
- from google .cloud .grpc .datastore .v1 import datastore_pb2
636
- from google .cloud .grpc .datastore .v1 import entity_pb2
637
- from google .cloud .grpc .datastore .v1 import query_pb2
635
+ from google .cloud .proto .datastore .v1 import datastore_pb2
636
+ from google .cloud .proto .datastore .v1 import entity_pb2
637
+ from google .cloud .proto .datastore .v1 import query_pb2
638
638
639
639
project = 'PROJECT'
640
640
kind = 'Kind'
@@ -670,7 +670,7 @@ def test_run_query_w_namespace_nonempty_result(self):
670
670
self .assertEqual (request .query , q_pb )
671
671
672
672
def test_begin_transaction (self ):
673
- from google .cloud .grpc .datastore .v1 import datastore_pb2
673
+ from google .cloud .proto .datastore .v1 import datastore_pb2
674
674
675
675
PROJECT = 'PROJECT'
676
676
TRANSACTION = b'TRANSACTION'
@@ -693,7 +693,7 @@ def test_begin_transaction(self):
693
693
request .ParseFromString (cw ['body' ])
694
694
695
695
def test_commit_wo_transaction (self ):
696
- from google .cloud .grpc .datastore .v1 import datastore_pb2
696
+ from google .cloud .proto .datastore .v1 import datastore_pb2
697
697
from google .cloud .datastore .helpers import _new_value_pb
698
698
699
699
project = 'PROJECT'
@@ -729,7 +729,7 @@ def test_commit_wo_transaction(self):
729
729
self .assertEqual (request .mode , rq_class .NON_TRANSACTIONAL )
730
730
731
731
def test_commit_w_transaction (self ):
732
- from google .cloud .grpc .datastore .v1 import datastore_pb2
732
+ from google .cloud .proto .datastore .v1 import datastore_pb2
733
733
from google .cloud .datastore .helpers import _new_value_pb
734
734
735
735
project = 'PROJECT'
@@ -765,7 +765,7 @@ def test_commit_w_transaction(self):
765
765
self .assertEqual (request .mode , rq_class .TRANSACTIONAL )
766
766
767
767
def test_rollback_ok (self ):
768
- from google .cloud .grpc .datastore .v1 import datastore_pb2
768
+ from google .cloud .proto .datastore .v1 import datastore_pb2
769
769
770
770
PROJECT = 'PROJECT'
771
771
TRANSACTION = b'xact'
@@ -789,7 +789,7 @@ def test_rollback_ok(self):
789
789
self .assertEqual (request .transaction , TRANSACTION )
790
790
791
791
def test_allocate_ids_empty (self ):
792
- from google .cloud .grpc .datastore .v1 import datastore_pb2
792
+ from google .cloud .proto .datastore .v1 import datastore_pb2
793
793
794
794
PROJECT = 'PROJECT'
795
795
rsp_pb = datastore_pb2 .AllocateIdsResponse ()
@@ -811,7 +811,7 @@ def test_allocate_ids_empty(self):
811
811
self .assertEqual (list (request .keys ), [])
812
812
813
813
def test_allocate_ids_non_empty (self ):
814
- from google .cloud .grpc .datastore .v1 import datastore_pb2
814
+ from google .cloud .proto .datastore .v1 import datastore_pb2
815
815
816
816
PROJECT = 'PROJECT'
817
817
before_key_pbs = [
0 commit comments