Open
Description
I want to test that some data are correctly created/updated in index.
Before each test I need to rebuild the index calling command search_index --rebuild --models app.django_models -f
It would be great if DocType
had a classmethod to rebuild its index like this:
@classmethod
def rebuild(self):
call_command('search_index', '--rebuild', '--models', 'app.django_model', '-f')
The management command should accept another argument like --quiet
to not print anything during test
The final function could be:
@classmethod
def rebuild(self):
call_command('search_index', '--rebuild', '--models', 'app.django_model', '-f', '--quiet')
What do you think (Can do the PR if you want) ?