{ "info": { "author": "kitconcept GmbH", "author_email": "info@kitconcept.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": ".. image:: https://travis-ci.org/kitconcept/pytest-solr.svg?branch=master\r\n :target: https://travis-ci.org/kitconcept/pytest-solr\r\n\r\nSolr process and client fixtures for py.test.\r\n\r\n.. image:: http://kitconcept.com/logo.svg\r\n :height: 65\r\n :width: 200\r\n :alt: kitconcept\r\n :align: center\r\n :target: https://www.kitconcept.com/\r\n\r\nIntroduction\r\n------------\r\n\r\npytest-solr is a pytest plugin for the Apache Solr search server.\r\nIt provides three pytest factories:\r\n\r\nsolr_process:\r\n For starting and stopping the Solr server. This is session scoped.\r\n\r\nsolr_core:\r\n For loading and unloading a Solr core configuration. This is module scoped.\r\n\r\nsolr:\r\n For connecting to a Solr server during a test. This is function scoped.\r\n\r\n\r\nSolr Process\r\n^^^^^^^^^^^^\r\n\r\nThe solr_process factory starts and stops a the Solr process.\r\nAn existing Solr executable is required for this.\r\n\r\n'executable':\r\n path to the Solr executable. Default value is 'downloads/solr-/bin/solr'\r\n'host':\r\n hostname where Solr runs. Default value is 'localhost'.\r\n'port':\r\n port Solr uses. Default is value is '18983'.\r\n'core':\r\n Solr core that is used. Default value is 'solr'.\r\n'timeout':\r\n timeout to wait for Solr to start. Default value is '60' (seconds).\r\n\r\nExample::\r\n\r\n from pytest_solr.factories import solr_process\r\n\r\n solr_process = solr_process(\r\n executable='solr-6.5.0/bin/solr',\r\n host='localhost',\r\n port=8983,\r\n core='default',\r\n version='6.5.0',\r\n timeout=60\r\n )\r\n\r\n\r\nSolr Core\r\n^^^^^^^^^\r\n\r\nThe solr_core factory adds and removes a Solr core configuration.\r\nIt expects two parameters, the Solr Process fixture name and the Solr core name.\r\n\r\n'solr_process_fixture_name':\r\n String with the name of the Solr Process. This is a required parameter.\r\n'solr_core_name':\r\n String with the name of the Solr core. Default value is 'default'.\r\n\r\nExample::\r\n\r\n from pytest_solr.factories import solr_core\r\n\r\n my_solr_core = solr_core('solr_process', 'my_solr_core')\r\n\r\n\r\nSolr\r\n^^^^\r\n\r\nThe Solr factory connects to Solr via pysolr.\r\nIt expects a single parameter, the Solr core fixture name.\r\n\r\n'solr_core_fixture_name':\r\n String with the name of the Solr core. This is a required parameter.\r\n\r\nExample::\r\n\r\n # -*- coding: utf-8 -*-\r\n from pytest_solr.factories import solr_core\r\n from pytest_solr.factories import solr\r\n\r\n minimal = solr_core('solr_process', 'minimal')\r\n solr = solr('minimal')\r\n\r\n def test_exact_term_match(solr):\r\n solr.add([{'id': '1', 'title': 'bananas'}])\r\n assert 1 == solr.search('title:bananas').hits\r\n\r\nThe solr fixture can then be injected into the test function and used to add documents to solr or search for terms.\r\n\r\nSee the `pysolr documentation `_. for more details.\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nInstall pytest-solr with pip::\r\n\r\n $ pip install pytest-solr\r\n\r\n\r\nUsage\r\n-----\r\n\r\nCreate a solr core with the name 'minimal' and inject the use the solr factory into a test function to use it::\r\n\r\n # -*- coding: utf-8 -*-\r\n from pytest_solr.factories import solr_core\r\n from pytest_solr.factories import solr\r\n\r\n minimal = solr_core('solr_process', 'minimal')\r\n solr = solr('minimal')\r\n\r\n\r\n def test_exact_term_match(solr):\r\n solr.add([{'id': '1', 'title': 'bananas'}])\r\n assert 1 == solr.search('title:bananas').hits\r\n\r\n\r\nContribute\r\n----------\r\n\r\n- `Source code at Github `_\r\n- `Issue tracker at Github `_\r\n\r\n\r\nSupport\r\n-------\r\n\r\nIf you are having issues, `please let us know `_. If you require professional support feel free to contact us at `info@kitconcept.com. `_\r\n\r\n\r\n1.0a1 (2017-06-22)\r\n------------------\r\n\r\n- Initial release.\r\n [timo]", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kitconcept/pytest-solr", "keywords": "tests py.test pytest fixture solr", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-solr", "package_url": "https://pypi.org/project/pytest-solr/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytest-solr/", "project_urls": { "Homepage": "https://github.com/kitconcept/pytest-solr" }, "release_url": "https://pypi.org/project/pytest-solr/1.0a1/", "requires_dist": null, "requires_python": null, "summary": "Solr process and client fixtures for py.test.", "version": "1.0a1" }, "last_serial": 3772753, "releases": { "1.0a1": [ { "comment_text": "", "digests": { "md5": "4009307284563fb26377536217e1cd43", "sha256": "2bcb985eaf1da086b5c1b703d6416f8b09642b581a51b61b21cc98f87bc66e9f" }, "downloads": -1, "filename": "pytest-solr-1.0a1.tar.gz", "has_sig": false, "md5_digest": "4009307284563fb26377536217e1cd43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5157, "upload_time": "2017-06-22T09:46:28", "url": "https://files.pythonhosted.org/packages/fd/e7/4e63d8a4cbd344fd5997557d2cce3204e0d30afdbb60d14c395c68115f80/pytest-solr-1.0a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4009307284563fb26377536217e1cd43", "sha256": "2bcb985eaf1da086b5c1b703d6416f8b09642b581a51b61b21cc98f87bc66e9f" }, "downloads": -1, "filename": "pytest-solr-1.0a1.tar.gz", "has_sig": false, "md5_digest": "4009307284563fb26377536217e1cd43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5157, "upload_time": "2017-06-22T09:46:28", "url": "https://files.pythonhosted.org/packages/fd/e7/4e63d8a4cbd344fd5997557d2cce3204e0d30afdbb60d14c395c68115f80/pytest-solr-1.0a1.tar.gz" } ] }