Added section on running tests.

This commit is contained in:
Ryan Freebern 2011-07-05 11:31:27 -04:00
Родитель cef11c83fa
Коммит 2f11b7136a
1 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -9,3 +9,30 @@ It does the following:
* If `ES_HOSTS` is empty it raises a `SkipTest`.
* `self.es` is available from the `ESTestCase` class and any subclasses.
* At the end of the Test Case the index is destroyed.
Testing Elasticutils
--------------------
Testing elasticutils requires pyes_ and nose_. The easiest way to test is
to set up a new virtualenv with those packages installed:
::
mkvirtualenv elasticutils
workon elasticutils
pip install pyes
pip install nose
Then, ``cd`` to the elasticutils base directory and run:
::
nosetests -w tests/
You may need to edit `es_settings.py` to change the value of ES_HOSTS to match
the IP or port that elasticsearch is listening on.
.. _pyes: http://pypi.python.org/pypi/pyes/
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/