File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ def main():
14
14
TestRunner = get_runner (settings )
15
15
test_runner = TestRunner (failfast = True )
16
16
# kept here to run a single test
17
- # failures = test_runner.run_tests(
18
- # [
19
- # "tests.test_index.IndexTestCase.test_reindex_with_rules "
20
- # ]
21
- # )
22
- failures = test_runner .run_tests (["tests" ])
17
+ failures = test_runner .run_tests (
18
+ [
19
+ "tests.test_index.IndexTestCase"
20
+ ]
21
+ )
22
+ # failures = test_runner.run_tests(["tests"])
23
23
sys .exit (bool (failures ))
24
24
25
25
Original file line number Diff line number Diff line change 10
10
from .models import User , Website , Example
11
11
12
12
13
+ def sanitize (hit ):
14
+ if "_highlightResult" in hit :
15
+ hit .pop ("_highlightResult" )
16
+ return hit
17
+
18
+
13
19
class IndexTestCase (TestCase ):
14
20
def setUp (self ):
15
21
self .client = algolia_engine .client
@@ -320,7 +326,7 @@ class WebsiteIndex(AlgoliaIndex):
320
326
synonyms = []
321
327
self .client .browse_synonyms (
322
328
self .index .index_name ,
323
- lambda _resp : synonyms .extend ([_hit .to_dict () for _hit in _resp .hits ]),
329
+ lambda _resp : synonyms .extend ([sanitize ( _hit .to_dict () ) for _hit in _resp .hits ]),
324
330
)
325
331
self .assertEqual (len (synonyms ), 1 , "There should only be one synonym" )
326
332
self .assertIn (
You can’t perform that action at this time.
0 commit comments