def test_get_index_queryset(self):
     idx_obj = CategoryIndex()
     self.assertEqualItems(
         [q.id for q in idx_obj.get_index_queryset("en")],
         [self.category1.id],
     )
     self.assertEqualItems(
         [q.id for q in idx_obj.get_index_queryset("de")],
         [self.category1.id, self.category2.id],
     )
 def test_get_search_data(self):
     idx_obj = CategoryIndex()
     category1 = self.reload(self.category1, "en")
     search_data = idx_obj.get_search_data(category1, "en", None)
     self.assertEqual(search_data, category1.name)
 def test_get_title(self):
     idx_obj = CategoryIndex()
     category1 = self.reload(self.category1, "en")
     self.assertEqual(idx_obj.get_title(category1), category1.name)