Skip to content

Commit b120c2d

Browse files
committed
stop using deprecated remove() in tests
1 parent ff3436b commit b120c2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flask_pymongo/tests/test_wrappers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class CollectionTest(FlaskPyMongoTest):
77

88
def test_find_one_or_404(self):
9-
self.mongo.db.things.remove()
9+
self.mongo.db.things.delete_many({})
1010

1111
try:
1212
self.mongo.db.things.find_one_or_404({"_id": "thing"})
@@ -20,7 +20,7 @@ def test_find_one_or_404(self):
2020
assert thing["val"] == "foo", "got wrong thing"
2121

2222
# also test with dotted-named collections
23-
self.mongo.db.things.morethings.remove()
23+
self.mongo.db.things.morethings.delete_many({})
2424
try:
2525
self.mongo.db.things.morethings.find_one_or_404({"_id": "thing"})
2626
except HTTPException as notfound:

0 commit comments

Comments
 (0)