@@ -70,7 +70,7 @@ def test_it(self):
7070 _KIND = 'KIND'
7171 _ID = 1234
7272 entity_pb = entity_pb2 .Entity ()
73- entity_pb .key .partition_id .dataset_id = _PROJECT
73+ entity_pb .key .partition_id .project_id = _PROJECT
7474 entity_pb .key .path_element .add (kind = _KIND , id = _ID )
7575
7676 value_pb = _new_value_pb (entity_pb , 'foo' )
@@ -117,7 +117,7 @@ def test_mismatched_value_indexed(self):
117117 _KIND = 'KIND'
118118 _ID = 1234
119119 entity_pb = entity_pb2 .Entity ()
120- entity_pb .key .partition_id .dataset_id = _PROJECT
120+ entity_pb .key .partition_id .project_id = _PROJECT
121121 entity_pb .key .path_element .add (kind = _KIND , id = _ID )
122122
123123 list_val_pb = _new_value_pb (entity_pb , 'baz' )
@@ -173,7 +173,7 @@ def test_nested_entity_no_key(self):
173173 inside_val_pb .integer_value = INSIDE_VALUE
174174
175175 entity_pb = entity_pb2 .Entity ()
176- entity_pb .key .partition_id .dataset_id = PROJECT
176+ entity_pb .key .partition_id .project_id = PROJECT
177177 element = entity_pb .key .path_element .add ()
178178 element .kind = KIND
179179
@@ -235,7 +235,7 @@ def test_key_only(self):
235235 entity_pb = self ._callFUT (entity )
236236
237237 expected_pb = entity_pb2 .Entity ()
238- expected_pb .key .partition_id .dataset_id = project
238+ expected_pb .key .partition_id .project_id = project
239239 path_elt = expected_pb .key .path_element .add ()
240240 path_elt .kind = kind
241241 path_elt .name = name
@@ -279,7 +279,7 @@ def test_inverts_to_protobuf(self):
279279
280280 original_pb = entity_pb2 .Entity ()
281281 # Add a key.
282- original_pb .key .partition_id .dataset_id = project = 'PROJECT'
282+ original_pb .key .partition_id .project_id = project = 'PROJECT'
283283 elem1 = original_pb .key .path_element .add ()
284284 elem1 .kind = 'Family'
285285 elem1 .id = 1234
@@ -322,7 +322,7 @@ def test_inverts_to_protobuf(self):
322322 new_pb = self ._callFUT (entity )
323323
324324 # NOTE: entity_to_protobuf() strips the project so we "cheat".
325- new_pb .key .partition_id .dataset_id = project
325+ new_pb .key .partition_id .project_id = project
326326 self ._compareEntityProto (original_pb , new_pb )
327327
328328 def test_meaning_with_change (self ):
@@ -355,7 +355,7 @@ def _makePB(self, project=None, namespace=None, path=()):
355355 from gcloud .datastore ._generated import entity_pb2
356356 pb = entity_pb2 .Key ()
357357 if project is not None :
358- pb .partition_id .dataset_id = project
358+ pb .partition_id .project_id = project
359359 if namespace is not None :
360360 pb .partition_id .namespace = namespace
361361 for elem in path :
@@ -563,7 +563,7 @@ def test_entity(self):
563563 pb = entity_pb2 .Value ()
564564 entity_pb = pb .entity_value
565565 entity_pb .key .path_element .add (kind = 'KIND' )
566- entity_pb .key .partition_id .dataset_id = 'PROJECT'
566+ entity_pb .key .partition_id .project_id = 'PROJECT'
567567
568568 value_pb = _new_value_pb (entity_pb , 'foo' )
569569 value_pb .string_value = 'Foo'
@@ -740,7 +740,7 @@ def _callFUT(self, key_pb):
740740 def test_prepare_project_valid (self ):
741741 from gcloud .datastore ._generated import entity_pb2
742742 key = entity_pb2 .Key ()
743- key .partition_id .dataset_id = 'foo'
743+ key .partition_id .project_id = 'foo'
744744 new_key = self ._callFUT (key )
745745 self .assertFalse (new_key is key )
746746
@@ -907,7 +907,7 @@ def lookup(self, project, key_pbs):
907907
908908 response = entity_pb2 .Entity ()
909909 response .key .CopyFrom (key_pb )
910- response .key .partition_id .dataset_id = self .prefix + project
910+ response .key .partition_id .project_id = self .prefix + project
911911
912912 missing = []
913913 deferred = []
0 commit comments