Added elemMatch operator as well - match is too obscure #653

This commit is contained in:
Ross Lawley
2014-06-27 13:39:47 +01:00
parent f4aa546af8
commit be3643c962
3 changed files with 6 additions and 2 deletions

View File

@@ -3604,6 +3604,9 @@ class QuerySetTest(unittest.TestCase):
ak = list(Bar.objects(foo__match={'shape': "square", "color": "purple"}))
self.assertEqual([b1], ak)
ak = list(Bar.objects(foo__elemMatch={'shape': "square", "color": "purple"}))
self.assertEqual([b1], ak)
ak = list(Bar.objects(foo__match=Foo(shape="square", color="purple")))
self.assertEqual([b1], ak)