From 2b17985a11b5ff9baa206d513f2d05e502122039 Mon Sep 17 00:00:00 2001 From: Agustin Barto Date: Fri, 17 May 2019 13:55:00 -0300 Subject: [PATCH] Uncomment tests. --- tests/queryset/transform.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/queryset/transform.py b/tests/queryset/transform.py index 3c7c945f..b2bc1d6c 100644 --- a/tests/queryset/transform.py +++ b/tests/queryset/transform.py @@ -276,15 +276,15 @@ class TransformTest(unittest.TestCase): title = StringField() content = EmbeddedDocumentField(SubDoc) - # word = Word(word='abc', index=1) - # update = transform.update(MainDoc, pull__content__text=word) - # self.assertEqual(update, {'$pull': {'content.text': SON([('word', u'abc'), ('index', 1)])}}) + word = Word(word='abc', index=1) + update = transform.update(MainDoc, pull__content__text=word) + self.assertEqual(update, {'$pull': {'content.text': SON([('word', u'abc'), ('index', 1)])}}) - # update = transform.update(MainDoc, pull__content__heading='xyz') - # self.assertEqual(update, {'$pull': {'content.heading': 'xyz'}}) + update = transform.update(MainDoc, pull__content__heading='xyz') + self.assertEqual(update, {'$pull': {'content.heading': 'xyz'}}) - # update = transform.update(MainDoc, pull__content__text__word__in=['foo', 'bar']) - # self.assertEqual(update, {'$pull': {'content.text': {'word': {'$in': ['foo', 'bar']}}}}) + update = transform.update(MainDoc, pull__content__text__word__in=['foo', 'bar']) + self.assertEqual(update, {'$pull': {'content.text': {'word': {'$in': ['foo', 'bar']}}}}) update = transform.update(MainDoc, pull__content__text__word__nin=['foo', 'bar']) self.assertEqual(update, {'$pull': {'content.text': {'word': {'$nin': ['foo', 'bar']}}}})