remove use of deprecated options arg from tests

This commit is contained in:
Mike Dirolf 2010-03-10 11:45:02 -05:00
parent eadb585472
commit 5371b627bb
3 changed files with 4 additions and 6 deletions

View File

@ -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())

View File

@ -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)

View File

@ -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"})