do not test position push in mongodb_v2.4 #1565
This commit is contained in:
parent
f3ee4a5dac
commit
7782aa7379
@ -777,7 +777,6 @@ class InstanceTest(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertDbEqual([dict(doc.to_mongo())])
|
self.assertDbEqual([dict(doc.to_mongo())])
|
||||||
|
|
||||||
|
|
||||||
def test_modify_invalid_query(self):
|
def test_modify_invalid_query(self):
|
||||||
doc1 = self.Person(name="bob", age=10).save()
|
doc1 = self.Person(name="bob", age=10).save()
|
||||||
doc2 = self.Person(name="jim", age=20).save()
|
doc2 = self.Person(name="jim", age=20).save()
|
||||||
|
@ -2,6 +2,8 @@ import unittest
|
|||||||
|
|
||||||
from mongoengine import connect, Document, IntField, StringField, ListField
|
from mongoengine import connect, Document, IntField, StringField, ListField
|
||||||
|
|
||||||
|
from tests.utils import needs_mongodb_v26
|
||||||
|
|
||||||
__all__ = ("FindAndModifyTest",)
|
__all__ = ("FindAndModifyTest",)
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +96,7 @@ class FindAndModifyTest(unittest.TestCase):
|
|||||||
self.assertEqual(old_doc.to_mongo(), {"_id": 1})
|
self.assertEqual(old_doc.to_mongo(), {"_id": 1})
|
||||||
self.assertDbEqual([{"_id": 0, "value": 0}, {"_id": 1, "value": -1}])
|
self.assertDbEqual([{"_id": 0, "value": 0}, {"_id": 1, "value": -1}])
|
||||||
|
|
||||||
|
@needs_mongodb_v26
|
||||||
def test_modify_with_push(self):
|
def test_modify_with_push(self):
|
||||||
class BlogPost(Document):
|
class BlogPost(Document):
|
||||||
id = StringField(primary_key=True)
|
id = StringField(primary_key=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user