apache_beam.io.gcp.datastore.v1.fake_datastore module¶
Fake datastore used for unit testing.
For internal use only; no backwards-compatibility guarantees.
-
apache_beam.io.gcp.datastore.v1.fake_datastore.
create_run_query
(entities, batch_size)[source]¶ A fake datastore run_query method that returns entities in batches.
Note: the outer method is needed to make the entities and batch_size available in the scope of fake_run_query method.
Parameters: - entities – list of entities supposed to be contained in the datastore.
- batch_size – the number of entities that run_query method returns in one request.
-
apache_beam.io.gcp.datastore.v1.fake_datastore.
create_commit
(mutations)[source]¶ A fake Datastore commit method that writes the mutations to a list.
Parameters: mutations – A list to write mutations to. Returns: A fake Datastore commit method