From bf8b897dc86e28e4ad79e05f24383c1387eddbf6 Mon Sep 17 00:00:00 2001 From: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Date: Wed, 8 Apr 2020 02:33:09 +0530 Subject: [PATCH] feat(datastore): add missing method for system test with emulator (#19) Co-authored-by: Christopher Wilcox --- tests/system/utils/clear_datastore.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/system/utils/clear_datastore.py b/tests/system/utils/clear_datastore.py index 03f5ffdd..3438ff89 100644 --- a/tests/system/utils/clear_datastore.py +++ b/tests/system/utils/clear_datastore.py @@ -80,6 +80,13 @@ def remove_kind(kind, client): delete_chunks(client, results) +def remove_all_entities(client): + query = client.query() + results = list(query.fetch()) + keys = [entity.key for entity in results] + client.delete_multi(keys) + + def main(): client = datastore.Client() kinds = sys.argv[1:]