pytest-django-haystack

Cleanup your Haystack indexes between tests


License
BSD-3-Clause
Install
pip install pytest-django-haystack==0.3.0

Documentation

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

  1. pip install pytest-django-haystack
  2. Mark tests with the pytest.mark.haystack marker.

You can optionally specify which haystack connection(s) should be used:

@pytest.mark.haystack(connection=["test"])