Metadata-Version: 1.1
Name: testing.elasticsearch
Version: 0.1.0
Summary: Automatically sets up an elasticsearch instance in a temporary directory, and destroys it after testing
Home-page: https://github.com/jong/testing.elasticsearch
Author: Jon Gartman
Author-email: jongartman@gmail.com
License: MIT
Description: testing.elasticsearch
        =====================
        
        `testing.elasticsearch` automatically sets up an elasticsearch instance in a
        temporary directory, and destroys it after testing. It's useful as a pytest
        fixture for testing interactions with elasticsearch in an isolated manner.
        
        
        Implementation is based off the awesome `testing.redis<https://bitbucket.org/tk0miya/testing.redis>`_ module.
        
        Example usage:
        
        .. code-block:: python
        
            import testing.elasticsearch
            import pyes.es import ES
        
            # launch new elasticsearch server:
            with testing.elasticsearch.ElasticSearchServer() es:
                elasticsearch = ES(es.dsn())
                # perform any testing with elasticsearch here
        
            # elasticsearch server is terminated and cleaned up here
        
        
        You can also setup a pytest fixture:
        
        .. code-block:: python
        
            @pytest.fixture(scope='session')
            def elasticsearch(request):
                """
                A testing fixture that provides a running elasticsearch server.
                """
                es = ElasticSearchServer()
                es.start()
                request.addfinalizer(es.stop)
                return es
        
        
        Testing
        -------
        
        To run tests you'll need to install the test requirements:
        
        .. code-block:: python
        
            pip install -r src/tests/requirements.txt
        
        Run tests:
        
        .. code-block:: python
        
            python src/tests/runtests.py
        
Keywords: testing,elasticsearch
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Topic :: Software Development :: Libraries :: Python Modules
