Skip to content

Commit 971489e

Browse files
author
Jon Wayne Parrott
authored
Revert "api_core: Make PageIterator.item_to_value public. (#4702)" (#4731)
1 parent 40be8b0 commit 971489e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/google-cloud-datastore/google/cloud/datastore/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def _next_page(self):
515515
query=query_pb,
516516
)
517517
entity_pbs = self._process_query_results(response_pb)
518-
return page_iterator.Page(self, entity_pbs, self.item_to_value)
518+
return page_iterator.Page(self, entity_pbs, self._item_to_value)
519519

520520

521521
def _pb_from_query(query):

packages/google-cloud-datastore/tests/unit/test_query.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ def test_constructor_defaults(self):
361361

362362
self.assertFalse(iterator._started)
363363
self.assertIs(iterator.client, client)
364+
self.assertIsNotNone(iterator._item_to_value)
364365
self.assertIsNone(iterator.max_results)
365366
self.assertEqual(iterator.page_number, 0)
366367
self.assertIsNone(iterator.next_page_token,)
@@ -383,6 +384,7 @@ def test_constructor_explicit(self):
383384

384385
self.assertFalse(iterator._started)
385386
self.assertIs(iterator.client, client)
387+
self.assertIsNotNone(iterator._item_to_value)
386388
self.assertEqual(iterator.max_results, limit)
387389
self.assertEqual(iterator.page_number, 0)
388390
self.assertEqual(iterator.next_page_token, start_cursor)

0 commit comments

Comments
 (0)