From 9ae2c731ed075929b6046b699a2cc355d03ff0a6 Mon Sep 17 00:00:00 2001 From: Stefan Wojcik Date: Tue, 3 Mar 2015 14:30:09 -0800 Subject: [PATCH] dont drop any system collections --- mongoengine/django/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoengine/django/tests.py b/mongoengine/django/tests.py index d7fc3939..b130acc8 100644 --- a/mongoengine/django/tests.py +++ b/mongoengine/django/tests.py @@ -23,7 +23,7 @@ class MongoTestCase(TestCase): def dropCollections(self): for collection in self.db.collection_names(): - if collection == 'system.indexes': + if collection.startswith('system.'): continue self.db.drop_collection(collection)