From 4257de4143d5291d636d14f36f870b10019ee532 Mon Sep 17 00:00:00 2001 From: Matthew Evans Date: Wed, 4 Mar 2020 17:35:26 +0000 Subject: [PATCH] Add note about mongomock bug --- tests/server/test_query_params.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/server/test_query_params.py b/tests/server/test_query_params.py index bea6ea66f..016cc048c 100644 --- a/tests/server/test_query_params.py +++ b/tests/server/test_query_params.py @@ -397,11 +397,10 @@ def test_list_length(self): def test_list_has_only(self): """ Test HAS ONLY query on elements. - Curiously this test fails under mongomock when $size is 1, but works with a real mongo. + This test fails with mongomock<=3.1.9 when $size is 1, but works with a real mongo. - The queries produced in each case should be: - - `{"elements": {"$all": ["Ac", "Mg"], "$size": 2}}` - - `{"elements": {"$all": ["Ac"], "$size": 1}}` + TODO: this text should be removed once mongomock>3.1.9 has been released, which should + contain the bugfix for this: https://github.com/mongomock/mongomock/pull/597. """