Skip to content

Commit

Permalink
tests: take 2 on TI test
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Oct 3, 2023
1 parent 39bb61d commit 8f812c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hordelib/model_manager/ti.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,17 @@ def fuzzy_find_ti_key(self, ti_name):
if Sanitizer.has_unicode(sname):
for ti in self._index_orig_names:
if sname in ti:
return self._index_orig_names[ti]
return self._index_orig_names[ti].lower().strip()
# If a unicode name is not found in the orig_names index
# it won't be found anywhere else, as unicode chars are converted to ascii in the keys
# This saves us time doing unnecessary fuzzy searches
return None
for ti in self.model_reference:
if sname in ti:
return ti
return ti.lower().strip()
for ti in self.model_reference:
if fuzz.ratio(sname, ti) > 80:
return ti
return ti.lower().strip()
return None

# Using `get_model` instead of `get_ti` as it exists in the base class
Expand Down

0 comments on commit 8f812c3

Please sign in to comment.