This commit is contained in:
Ross Lawley 2014-06-26 16:02:40 +01:00
parent b02a31d4b9
commit dd51589f67
3 changed files with 9 additions and 9 deletions

View File

@ -72,7 +72,7 @@ setup(name='mongoengine',
long_description=LONG_DESCRIPTION, long_description=LONG_DESCRIPTION,
platforms=['any'], platforms=['any'],
classifiers=CLASSIFIERS, classifiers=CLASSIFIERS,
install_requires=['pymongo>=2.5'], install_requires=['pymongo>=2.7'],
test_suite='nose.collector', test_suite='nose.collector',
**extra_opts **extra_opts
) )

View File

@ -57,7 +57,7 @@ class InstanceTest(unittest.TestCase):
date = DateTimeField(default=datetime.now) date = DateTimeField(default=datetime.now)
meta = { meta = {
'max_documents': 10, 'max_documents': 10,
'max_size': 90000, 'max_size': 4096,
} }
Log.drop_collection() Log.drop_collection()
@ -75,7 +75,7 @@ class InstanceTest(unittest.TestCase):
options = Log.objects._collection.options() options = Log.objects._collection.options()
self.assertEqual(options['capped'], True) self.assertEqual(options['capped'], True)
self.assertEqual(options['max'], 10) self.assertEqual(options['max'], 10)
self.assertEqual(options['size'], 90000) self.assertTrue(options['size'] >= 4096)
# Check that the document cannot be redefined with different options # Check that the document cannot be redefined with different options
def recreate_log_document(): def recreate_log_document():

View File

@ -650,7 +650,7 @@ class QuerySetTest(unittest.TestCase):
blogs.append(Blog(title="post %s" % i, posts=[post1, post2])) blogs.append(Blog(title="post %s" % i, posts=[post1, post2]))
Blog.objects.insert(blogs, load_bulk=False) Blog.objects.insert(blogs, load_bulk=False)
self.assertEqual(q, 1) # 1 for the insert self.assertEqual(q, 99) # profiling logs each doc now :(
Blog.drop_collection() Blog.drop_collection()
Blog.ensure_indexes() Blog.ensure_indexes()
@ -659,7 +659,7 @@ class QuerySetTest(unittest.TestCase):
self.assertEqual(q, 0) self.assertEqual(q, 0)
Blog.objects.insert(blogs) Blog.objects.insert(blogs)
self.assertEqual(q, 2) # 1 for insert, and 1 for in bulk fetch self.assertEqual(q, 100) # 99 or insert, and 1 for in bulk fetch
Blog.drop_collection() Blog.drop_collection()