def setUpTestData(cls): super(ESTestCaseWithAddons, cls).setUpTestData() # Load the fixture here, to not be overloaded by a child class' # fixture attribute. call_command('loaddata', 'addons/base_es') addon_ids = [1, 2, 3, 4, 5, 6] # From the addons/base_es fixture. cls._addons = list( Addon.objects.filter(pk__in=addon_ids).order_by('id')) from olympia.addons.tasks import index_addons index_addons(addon_ids) # Refresh ES. cls.refresh()
def setUpTestData(cls): super(ESTestCaseWithAddons, cls).setUpTestData() # Load the fixture here, to not be overloaded by a child class' # fixture attribute. call_command('loaddata', 'addons/base_es') addon_ids = [1, 2, 3, 4, 5, 6] # From the addons/base_es fixture. cls._addons = list(Addon.objects.filter(pk__in=addon_ids) .order_by('id')) from olympia.addons.tasks import index_addons index_addons(addon_ids) # Refresh ES. cls.refresh()