Skip to content

Conversation

@HemangChothani
Copy link
Contributor

Fixes #124

@HemangChothani HemangChothani requested review from a team, crwilcox and tseaver December 8, 2020 12:56
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 8, 2020
@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/python-datastore API. label Dec 8, 2020
Comment on lines -184 to +190
self, project_id, partition_id, read_options=None, query=None, gql_query=None
self,
project_id=None,
partition_id=None,
read_options=None,
query=None,
gql_query=None,
request=None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is not part of the public API for the library, and its only caller is google.cloud.datastore.query.Iterator._next_page, which passes only request as a dict, and optionally retry / timeout. So, we should simplify:

 def run_query(self, request, retry=None, timeout=None):
self.assertEqual(request.partition_id, partition_id._pb)
self.assertEqual(request.query, query_pb._pb)

def test_run_query_w_request_as_dict(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please factor out repeated setup code into helper methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastore Issues related to the googleapis/python-datastore API. cla: yes This human has signed the Contributor License Agreement.

2 participants