From 1a1cf49c67e1d64142b0e307695f45dad1785407 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 27 Apr 2023 08:47:36 -0700 Subject: [PATCH] Testing for whoosh support for multi-object query vars --- src/documents/tests/test_api.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/documents/tests/test_api.py b/src/documents/tests/test_api.py index a6307e2d5..d6158cd7d 100644 --- a/src/documents/tests/test_api.py +++ b/src/documents/tests/test_api.py @@ -955,8 +955,32 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase): [d1.id, d2.id, d5.id, d7.id], ) self.assertCountEqual(search_query("&correspondent__id=" + str(c.id)), [d1.id]) + self.assertCountEqual( + search_query("&correspondent__id__in=" + str(c.id)), + [d1.id], + ) + self.assertCountEqual( + search_query("&correspondent__id__none=" + str(c.id)), + [d2.id, d3.id, d4.id, d5.id, d7.id], + ) self.assertCountEqual(search_query("&document_type__id=" + str(dt.id)), [d2.id]) + self.assertCountEqual( + search_query("&document_type__id__in=" + str(dt.id)), + [d2.id], + ) + self.assertCountEqual( + search_query("&document_type__id__none=" + str(dt.id)), + [d1.id, d3.id, d4.id, d5.id, d7.id], + ) self.assertCountEqual(search_query("&storage_path__id=" + str(sp.id)), [d7.id]) + self.assertCountEqual( + search_query("&storage_path__id__in=" + str(sp.id)), + [d7.id], + ) + self.assertCountEqual( + search_query("&storage_path__id__none=" + str(sp.id)), + [d1.id, d2.id, d3.id, d4.id, d5.id], + ) self.assertCountEqual( search_query("&storage_path__isnull"),