do not test position push in mongodb_v2.4 #1565

This commit is contained in:
Erdenezul Batmunkh 2017-06-19 03:11:59 +00:00
parent f3ee4a5dac
commit 7782aa7379
2 changed files with 3 additions and 1 deletions

View File

@ -777,7 +777,6 @@ class InstanceTest(unittest.TestCase):
self.assertDbEqual([dict(doc.to_mongo())])
def test_modify_invalid_query(self):
doc1 = self.Person(name="bob", age=10).save()
doc2 = self.Person(name="jim", age=20).save()

View File

@ -2,6 +2,8 @@ import unittest
from mongoengine import connect, Document, IntField, StringField, ListField
from tests.utils import needs_mongodb_v26
__all__ = ("FindAndModifyTest",)
@ -94,6 +96,7 @@ class FindAndModifyTest(unittest.TestCase):
self.assertEqual(old_doc.to_mongo(), {"_id": 1})
self.assertDbEqual([{"_id": 0, "value": 0}, {"_id": 1, "value": -1}])
@needs_mongodb_v26
def test_modify_with_push(self):
class BlogPost(Document):
id = StringField(primary_key=True)