diff --git a/test/test_collection.py b/test/test_collection.py index 3d61fd740..e0973b4e2 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -295,9 +295,8 @@ class TestCollection(unittest.TestCase): self.assertEqual(db.test.doesnotexist.options(), {}) db.drop_collection("test") - options = {"capped": True} - db.create_collection("test", options) - self.assertEqual(db.test.options(), options) + db.create_collection("test", capped=True) + self.assertEqual(db.test.options(), {"capped": True}) db.drop_collection("test") def test_insert_find_one(self): @@ -616,7 +615,7 @@ class TestCollection(unittest.TestCase): def test_safe_remove(self): db = self.db db.drop_collection("test") - db.create_collection("test", {"capped": True, "size": 1000}) + db.create_collection("test", capped=True, size=1000) db.test.insert({"x": 1}) self.assertEqual(1, db.test.count()) diff --git a/test/test_cursor.py b/test/test_cursor.py index 8376aa754..bfcd78903 100644 --- a/test/test_cursor.py +++ b/test/test_cursor.py @@ -557,7 +557,7 @@ class TestCursor(unittest.TestCase): def test_tailable(self): db = self.db db.drop_collection("test") - db.create_collection("test", {"capped": True, "size": 1000}) + db.create_collection("test", capped=True, size=1000) cursor = db.test.find(tailable=True) diff --git a/test/test_database.py b/test/test_database.py index 792d31854..46abe027d 100644 --- a/test/test_database.py +++ b/test/test_database.py @@ -80,7 +80,6 @@ class TestDatabase(unittest.TestCase): self.assertRaises(TypeError, db.create_collection, 5) self.assertRaises(TypeError, db.create_collection, None) self.assertRaises(InvalidName, db.create_collection, "coll..ection") - self.assertRaises(TypeError, db.create_collection, "test", 5) test = db.create_collection("test") test.save({"hello": u"world"})