Implement test utils function to flush mongo db

This commit is contained in:
Sylvain Bellemare 2016-12-20 18:09:54 +01:00 committed by Sylvain Bellemare
parent 18d5a49097
commit f6a55c78af

View File

@ -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({})