mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Consistently use "entry", "score" in json response for all search types
- Had already made some progress on this earlier by updating the image search responses. But needed to update the text search responses to use lowercase entry and score - Update khoj.el to consume the updated json response keys for text search
This commit is contained in:
@@ -124,7 +124,7 @@ def test_notes_search(content_config: ContentConfig, search_config: SearchConfig
|
||||
# Assert
|
||||
assert response.status_code == 200
|
||||
# assert actual_data contains "Khoj via Emacs" entry
|
||||
search_result = response.json()[0]["Entry"]
|
||||
search_result = response.json()[0]["entry"]
|
||||
assert "git clone" in search_result
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ def test_notes_search_with_include_filter(content_config: ContentConfig, search_
|
||||
# Assert
|
||||
assert response.status_code == 200
|
||||
# assert actual_data contains explicitly included word "Emacs"
|
||||
search_result = response.json()[0]["Entry"]
|
||||
search_result = response.json()[0]["entry"]
|
||||
assert "Emacs" in search_result
|
||||
|
||||
|
||||
@@ -156,5 +156,5 @@ def test_notes_search_with_exclude_filter(content_config: ContentConfig, search_
|
||||
# Assert
|
||||
assert response.status_code == 200
|
||||
# assert actual_data does not contains explicitly excluded word "Emacs"
|
||||
search_result = response.json()[0]["Entry"]
|
||||
search_result = response.json()[0]["entry"]
|
||||
assert "clone" not in search_result
|
||||
|
||||
Reference in New Issue
Block a user