Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc61aa9

Browse files
nnethercottbrunoocasali
authored andcommitted
Add corresponding test
1 parent3ac52c1 commitbc61aa9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎tests/settings/test_settings_typo_tolerance_meilisearch.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
frommeilisearch.models.indeximportTypoTolerance
2+
3+
14
DEFAULT_TYPO_TOLERANCE= {
25
"enabled":True,
6+
"disableOnNumbers":False,
37
"minWordSizeForTypos": {
48
"oneTypo":5,
59
"twoTypos":9,
@@ -10,6 +14,7 @@
1014

1115
NEW_TYPO_TOLERANCE= {
1216
"enabled":True,
17+
"disableOnNumbers":False,
1318
"minWordSizeForTypos": {
1419
"oneTypo":6,
1520
"twoTypos":10,
@@ -65,3 +70,16 @@ def test_reset_typo_tolerance(empty_index):
6570
)
6671
assertupdate2.status=="succeeded"
6772
assertresponse_last.model_dump(by_alias=True)==DEFAULT_TYPO_TOLERANCE
73+
74+
75+
deftest_disable_numbers_true(empty_index):
76+
index=empty_index()
77+
78+
# Update settings
79+
response_update=index.update_typo_tolerance({"disableOnNumbers":True})
80+
update=index.wait_for_task(response_update.task_uid)
81+
assertupdate.status=="succeeded"
82+
83+
# Fetch updated settings
84+
tolerance:TypoTolerance=index.get_typo_tolerance()
85+
asserttolerance.disable_on_numbers

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp