mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Fix test word filter
This commit is contained in:
@@ -8,17 +8,15 @@ from khoj.utils.rawconfig import Entry
|
|||||||
def test_no_word_filter():
|
def test_no_word_filter():
|
||||||
# Arrange
|
# Arrange
|
||||||
word_filter = WordFilter()
|
word_filter = WordFilter()
|
||||||
entries = arrange_content()
|
|
||||||
q_with_no_filter = "head tail"
|
q_with_no_filter = "head tail"
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
can_filter = word_filter.can_filter(q_with_no_filter)
|
can_filter = word_filter.can_filter(q_with_no_filter)
|
||||||
ret_query, entry_indices = word_filter.apply(q_with_no_filter, entries)
|
filter_terms = word_filter.get_filter_terms(q_with_no_filter)
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
assert can_filter == False
|
assert can_filter == False
|
||||||
assert ret_query == "head tail"
|
assert filter_terms == []
|
||||||
assert entry_indices == {0, 1, 2, 3}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user