pytest-django-haystack
pytest-django-haystack is a plugin for pytest and pytest-django that rebuilds the Haystack index before every test and clears it again after.
Quick start
pip install pytest-django-haystack
- Mark tests with the
pytest.mark.haystack
marker.
You can optionally specify which haystack connection(s) should be used:
@pytest.mark.haystack(connection=["test"])