mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Testing for whoosh support for multi-object query vars
This commit is contained in:
parent
448dcbab46
commit
1a1cf49c67
@ -955,8 +955,32 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
|
|||||||
[d1.id, d2.id, d5.id, d7.id],
|
[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=" + 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=" + 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=" + 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(
|
self.assertCountEqual(
|
||||||
search_query("&storage_path__isnull"),
|
search_query("&storage_path__isnull"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user