Skip to content

Commit 5371b62

Browse files
author
Mike Dirolf
committed
remove use of deprecated options arg from tests
1 parent eadb585 commit 5371b62

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

test/test_collection.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,8 @@ def test_options(self):
295295
self.assertEqual(db.test.doesnotexist.options(), {})
296296

297297
db.drop_collection("test")
298-
options = {"capped": True}
299-
db.create_collection("test", options)
300-
self.assertEqual(db.test.options(), options)
298+
db.create_collection("test", capped=True)
299+
self.assertEqual(db.test.options(), {"capped": True})
301300
db.drop_collection("test")
302301

303302
def test_insert_find_one(self):
@@ -616,7 +615,7 @@ def test_safe_save(self):
616615
def test_safe_remove(self):
617616
db = self.db
618617
db.drop_collection("test")
619-
db.create_collection("test", {"capped": True, "size": 1000})
618+
db.create_collection("test", capped=True, size=1000)
620619

621620
db.test.insert({"x": 1})
622621
self.assertEqual(1, db.test.count())

test/test_cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def set_coll():
557557
def test_tailable(self):
558558
db = self.db
559559
db.drop_collection("test")
560-
db.create_collection("test", {"capped": True, "size": 1000})
560+
db.create_collection("test", capped=True, size=1000)
561561

562562
cursor = db.test.find(tailable=True)
563563

test/test_database.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def test_create_collection(self):
8080
self.assertRaises(TypeError, db.create_collection, 5)
8181
self.assertRaises(TypeError, db.create_collection, None)
8282
self.assertRaises(InvalidName, db.create_collection, "coll..ection")
83-
self.assertRaises(TypeError, db.create_collection, "test", 5)
8483

8584
test = db.create_collection("test")
8685
test.save({"hello": u"world"})

0 commit comments

Comments
 (0)