From f6a55c78af1172a6fa8854dcbec2cec27ced80d0 Mon Sep 17 00:00:00 2001 From: Sylvain Bellemare Date: Tue, 20 Dec 2016 18:09:54 +0100 Subject: [PATCH] Implement test utils function to flush mongo db --- tests/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 4b381e38..ca51fb6e 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -38,4 +38,6 @@ def flush_rethink_db(connection, dbname): @flush_db.register(MongoDBConnection) def flush_mongo_db(connection, dbname): - raise NotImplementedError + connection.conn[dbname].bigchain.delete_many({}) + connection.conn[dbname].backlog.delete_many({}) + connection.conn[dbname].votes.delete_many({})