MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / setUp

Method setUp

test_haystack/test_managers.py:46–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44 fixtures = ["bulk_data.json"]
45
46 def setUp(self):
47 super().setUp()
48
49 self.search_index = BasicMockModelSearchIndex
50 # Update the "index".
51 backend = connections["default"].get_backend()
52 backend.clear()
53 backend.update(self.search_index(), MockModel.objects.all())
54 ui = connections["default"].get_unified_index()
55 ui.build([BasicMockModelSearchIndex(), BasicAnotherMockModelSearchIndex()])
56
57 self.search_queryset = BasicMockModelSearchIndex.objects.all()
58
59 def test_queryset(self):
60 self.assertTrue(isinstance(self.search_queryset, SearchQuerySet))

Callers 1

setUpMethod · 0.45

Calls 8

get_unified_indexMethod · 0.80
buildMethod · 0.80
get_backendMethod · 0.45
clearMethod · 0.45
updateMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected