Skip to content

Commit 40be8b0

Browse files
author
Jon Wayne Parrott
authored
api_core: Make PageIterator.item_to_value public. (#4702)
1 parent eb783ac commit 40be8b0

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
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: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ def test_constructor_defaults(self):
361361

362362
self.assertFalse(iterator._started)
363363
self.assertIs(iterator.client, client)
364-
self.assertIsNotNone(iterator._item_to_value)
365364
self.assertIsNone(iterator.max_results)
366365
self.assertEqual(iterator.page_number, 0)
367366
self.assertIsNone(iterator.next_page_token,)
@@ -384,7 +383,6 @@ def test_constructor_explicit(self):
384383

385384
self.assertFalse(iterator._started)
386385
self.assertIs(iterator.client, client)
387-
self.assertIsNotNone(iterator._item_to_value)
388386
self.assertEqual(iterator.max_results, limit)
389387
self.assertEqual(iterator.page_number, 0)
390388
self.assertEqual(iterator.next_page_token, start_cursor)

0 commit comments

Comments
 (0)