File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ def test_get_settings_default(empty_index):
31
31
assert rule in response ['rankingRules' ]
32
32
for typo in DEFAULT_TYPO_TOLERANCE :
33
33
assert typo in response ['typoTolerance' ]
34
+ assert DEFAULT_TYPO_TOLERANCE .get (typo ) == response ['typoTolerance' ][typo ]
34
35
assert response ['distinctAttribute' ] is None
35
36
assert response ['searchableAttributes' ] == ['*' ]
36
37
assert response ['displayedAttributes' ] == ['*' ]
@@ -83,6 +84,7 @@ def test_reset_settings(empty_index):
83
84
assert rule in response ['rankingRules' ]
84
85
for typo in DEFAULT_TYPO_TOLERANCE :
85
86
assert typo in response ['typoTolerance' ]
87
+ assert DEFAULT_TYPO_TOLERANCE .get (typo ) == response ['typoTolerance' ][typo ]
86
88
assert response ['distinctAttribute' ] is None
87
89
assert response ['displayedAttributes' ] == ['*' ]
88
90
assert response ['searchableAttributes' ] == ['*' ]
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ def test_update_typo_tolerance(empty_index):
37
37
assert isinstance (response , dict )
38
38
for typo_tolerance in NEW_TYPO_TOLERANCE :
39
39
assert typo_tolerance in response
40
+ assert NEW_TYPO_TOLERANCE .get (typo_tolerance ) == response [typo_tolerance ]
40
41
41
42
def test_reset_typo_tolerance (empty_index ):
42
43
"""Tests resetting the typo_tolerance setting to its default value."""
@@ -50,6 +51,7 @@ def test_reset_typo_tolerance(empty_index):
50
51
assert isinstance (response , dict )
51
52
for typo_tolerance in NEW_TYPO_TOLERANCE :
52
53
assert typo_tolerance in response
54
+ assert NEW_TYPO_TOLERANCE .get (typo_tolerance ) == response [typo_tolerance ]
53
55
# Check the reset of the settings
54
56
response = index .reset_typo_tolerance ()
55
57
assert isinstance (response , dict )
You can’t perform that action at this time.
0 commit comments