From be51b3d977be2032a9386df32a41b26accb2faae Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 14 Oct 2022 17:13:49 +0200 Subject: [PATCH] OP-3426 - fix not dropping settings collection --- tests/lib/db_handler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index b181055012..108ebf560d 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -118,9 +118,8 @@ class DBHandler: "Run with overwrite=True") else: if collection: - coll = self.client[db_name_out].get(collection) - if coll: - coll.drop() + if collection in self.client[db_name_out].list_collection_names(): + self.client[db_name_out][collection].drop() else: self.teardown(db_name_out)