11# coding=utf-8
2- import time
32from django .conf import settings
43from django .test import TestCase
54
6- import unittest
75
86from algoliasearch_django import AlgoliaIndex
97from algoliasearch_django import algolia_engine
@@ -153,9 +151,6 @@ class WebsiteIndex(AlgoliaIndex):
153151 self .index = WebsiteIndex (Website , self .client , settings .ALGOLIA )
154152 self .index .reindex_all ()
155153
156- @unittest .skip (
157- reason = "FIXME: it's a known issue that reindex all might not work properly"
158- )
159154 def test_reindex_no_settings (self ):
160155 self .maxDiff = None
161156
@@ -179,9 +174,6 @@ class WebsiteIndex(AlgoliaIndex):
179174 "An index whose model has no settings should keep its settings after reindex" ,
180175 )
181176
182- @unittest .skip (
183- reason = "FIXME: it's a known issue that reindex all might not work properly"
184- )
185177 def test_reindex_with_settings (self ):
186178 import uuid
187179
@@ -232,7 +224,7 @@ class WebsiteIndex(AlgoliaIndex):
232224 self .index = WebsiteIndex (Website , self .client , settings .ALGOLIA )
233225
234226 # Given some existing query rules on the index
235- # index.__index .save_rule() # TODO: Check query rules are kept
227+ self . index .__client .save_rule ()
236228
237229 # Given some existing settings on the index
238230 existing_settings = self .apply_some_settings (self .index )
@@ -246,9 +238,6 @@ class WebsiteIndex(AlgoliaIndex):
246238 former_settings ["hitsPerPage" ] = 15
247239 self .assertDictEqual (self .index .get_settings (), former_settings )
248240
249- @unittest .skip (
250- reason = "FIXME: it's a known issue that reindex all might not work properly"
251- )
252241 def test_reindex_with_rules (self ):
253242 # Given an existing index defined with settings
254243 class WebsiteIndex (AlgoliaIndex ):
@@ -283,9 +272,6 @@ def remove_metadata(rule):
283272 self .assertEqual (len (rules ), 1 , "There should only be one rule" )
284273 self .assertIn (rule , rules , "The existing rule should be kept over reindex" )
285274
286- @unittest .skip (
287- reason = "FIXME: it's a known issue that reindex all might not work properly"
288- )
289275 def test_reindex_with_synonyms (self ):
290276 # Given an existing index defined with settings
291277 class WebsiteIndex (AlgoliaIndex ):
@@ -332,7 +318,6 @@ def apply_some_settings(self, index):
332318 index .settings ["hitsPerPage" ] = 42
333319 index .reindex_all ()
334320 index .settings ["hitsPerPage" ] = old_hpp
335- time .sleep (10 ) # FIXME: Refactor reindex_all to return taskID
336321 index_settings = index .get_settings ()
337322 # Expect the instance's settings to be applied at reindex
338323 self .assertEqual (
0 commit comments