From 48357640c69a893e889ff023dd0836fa183969f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20G=C3=A9rard?= Date: Sat, 14 Nov 2020 14:41:59 +0100 Subject: [PATCH] improve deprecated pymongo call --- tests/document/test_instance.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/document/test_instance.py b/tests/document/test_instance.py index f00c6655..42df3c48 100644 --- a/tests/document/test_instance.py +++ b/tests/document/test_instance.py @@ -3846,9 +3846,7 @@ class DBFieldMappingTest(MongoDBTestCase): self.DynDoc = DynDoc def tearDown(self): - for collection in self.db.collection_names(): - if "system." in collection: - continue + for collection in list_collection_names(self.db): self.db.drop_collection(collection) def test_setting_fields_in_constructor_of_strict_doc_uses_model_names(self):