Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nilbacardit26 committed Mar 25, 2024
1 parent 8a8a470 commit c398eac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
8.0.2 (unreleased)
------------------

- Nothing changed yet.
- Being able to search using multifields
[nilbacardit26]


8.0.1 (2024-03-21)
Expand Down
9 changes: 9 additions & 0 deletions guillotina_elasticsearch/tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,12 @@ async def test_normalizer_analyzers_search(es_requester):
)
assert resp["items_total"] == 2
assert resp["items"][0]["item_text"] == "another_text"

# We can search querying the new multi field raw of item_text which is a keyword
resp, status = await requester(
"GET",
"/db/guillotina/@search?type_name=FooContent&item_text.raw=another_text&_metadata=*",
headers={"X-Wait": "10"},
)
assert resp["items_total"] == 1
assert resp["items"][0]["item_text"] == "another_text"

0 comments on commit c398eac

Please sign in to comment.