{ "info": { "author": "Kyle Prestel", "author_email": "kprestel@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing" ], "description": "================\npytest-docker-db\n================\n\n.. image:: https://travis-ci.org/kprestel/pytest-docker-db.svg?branch=master\n :target: https://travis-ci.org/kprestel/pytest-docker-db\n :alt: See Build Status on Travis CI\n\nA plugin to use docker databases for pytests\n\n----\n\nThis `Pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `Cookiecutter-pytest-plugin`_\ntemplate.\n\nWhat is this?\n-------------\nThis is a pytest plugin that hooks into the host's :code:`docker` daemon to create and teardown containers within the pytest\nlife cycle.\n\n\nFeatures\n--------\n* Use custom :code:`Dockerfile`\\s or base images from `Dockerhub`_\n* Use :code:`volumes` to persist test data in between testing sessions\n* Specify what port you want the container to be listening on the host machine and the container\n* Optionally persist the container between test sessions\n* Name the containers created\n\nRequirements\n------------\n\n* docker-py>=1.10.6\n* pytest>=3.3.2\n* docker\n\n\nInstallation\n------------\n\nYou can install \"pytest-docker-db\" via `pip`_ from `PyPI`_::\n\n $ pip install pytest-docker-db\n\n\nConfiguration\n-------------\n\n* db-volume-args\n\n * Provide the \"-v\" arguments that you would pass to the\n \"docker run\" command if you were using the cli. If you need\n multiple volumes mounted separate them with commas.\n * The basic syntax is :code:`/host/vol/path:/path/in/container:rw`.\n If using a named volume, the syntax would be :code:`vol-name:/path/in/container:rw`\n 'For more information please visit the `docker documentation`_'\n\n* db-image\n\n * Specify the name of the image to use as the DB.\n\n * Must be in the form of :code:`\"image_name\":\"tag\"`.\n\n* db-name\n\n * Specify the name of the container. If this is not specified a random container name will be\n used with the prefix :code:`docker-db`\n\n* db-host-port\n\n * Specify the port that the db should be listening to on the host machine.\n\n* db-port\n\n * Specify the port that the db should be listening to in the container.\n This is often the default port used by your database.\n\n* db-persist-container\n\n * If set, the container created will not be torn down after the test suite has ran.\n By default any image created will be torn down and removed after the test suite has finished.\n\n* db-dockerfile\n\n * Specify the name of the Dockerfile within the directory set as the :code:`db-build-context`\n\n * If a path is given as well as an image name, the Dockerfile will be used.\n\n* db-docker-context\n\n * The directory to use as the docker build context.\n\n\n\nUsage\n-----\n\nPlugin contains one fixture:\n *docker_db* - it's a session scoped fixture that returns a `docker-py container` object.\n For almost all use cases the user will not care about this object.\n\nThe recommended way to use this fixture is to create an :code:`autouse=True` fixture in your :code:`conftest.py` file\nto automatically invoke the setup of the containers.\n\n::\n\n @pytest.fixture(scope='session', autouse=True)\n def my_docker_db(docker_db):\n pass\n\nCan be configured via the :code:`pytest` CLI or the :code:`pytest.ini` file.\n\npytest.ini:\n::\n\n [pytest]\n db-volume-args=/home/kp/vol:/var/lib/postgresql/data:rw\n db-image=postgres:latest\n db-name=test-postgres\n db-port=5432\n db-host-port=5434\n\npytest CLI using a `Dockerhub`_ image :\n::\n\n $ pytest --db-image=postgrest:latest --db-name=test-postgres --db-port=5432 --db-host-port=5434\n\npytest CLI using a custom image:\n::\n\n $ pytest --db-dockerfile=Dockerfile --db-name=test-postgres --db-port=5432 --db-host-port=5434\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-docker-db\" is free and open source software\n\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`: https://github.com/kprestel/pytest-docker-db/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.python.org/pypi/pip/\n.. _`PyPI`: https://pypi.python.org/pypi\n.. _`docker-py container`: http://docker-py.readthedocs.io/en/stable/containers.html\n.. _`Dockerhub`: https://hub.docker.com/\n.. _`docker documentation`: https://docs.docker.com/storage/volumes/#start-a-container-with-a-volume\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kprestel/pytest-docker-db", "keywords": "pytest docker database py.test postgres mysql sqlserver MSSQL", "license": "MIT", "maintainer": "Kyle Prestel", "maintainer_email": "kprestel@gmail.com", "name": "pytest-docker-db", "package_url": "https://pypi.org/project/pytest-docker-db/", "platform": "", "project_url": "https://pypi.org/project/pytest-docker-db/", "project_urls": { "Homepage": "https://github.com/kprestel/pytest-docker-db" }, "release_url": "https://pypi.org/project/pytest-docker-db/1.0.3/", "requires_dist": [ "pytest (>=3.1.1)", "docker (>=3.1.0)" ], "requires_python": ">=3.6", "summary": "A plugin to use docker databases for pytests", "version": "1.0.3" }, "last_serial": 4325676, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2c63c83cdb08df772a8da7c44916e7ee", "sha256": "183ff5557e606f80f9bda81edca983b1662142cca416e05aecaaa723c9e42f8b" }, "downloads": -1, "filename": "pytest_docker_db-0.1.0-py3.6.egg", "has_sig": false, "md5_digest": "2c63c83cdb08df772a8da7c44916e7ee", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 2186, "upload_time": "2018-02-19T20:25:53", "url": "https://files.pythonhosted.org/packages/90/b6/8d1a079b2aebbb4be8168127ca7fb9ed67963f4683b4a0ac057b79386106/pytest_docker_db-0.1.0-py3.6.egg" } ], "0.1.0a0": [ { "comment_text": "", "digests": { "md5": "01910b812c61ddae6732682837bb4d39", "sha256": "74f07ab8845710ad12928e731a186e49995212ec624bdf176f2b26dd24b77f24" }, "downloads": -1, "filename": "pytest_docker_db-0.1.0a0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "01910b812c61ddae6732682837bb4d39", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4116, "upload_time": "2018-03-11T18:47:25", "url": "https://files.pythonhosted.org/packages/2e/03/3a33d3e8c7016d294302340f980558256c50b0104d84d123369c46ef93f2/pytest_docker_db-0.1.0a0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24f7491b78b7417b3a9cdc2db7fa8b90", "sha256": "76f7076b15a53b4146be16d15e9b26471b6572a868100a9f8a12d730e728d236" }, "downloads": -1, "filename": "pytest_docker_db-0.1.0a0-py3.6.egg", "has_sig": false, "md5_digest": "24f7491b78b7417b3a9cdc2db7fa8b90", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 2165, "upload_time": "2018-03-11T18:47:28", "url": "https://files.pythonhosted.org/packages/c6/ac/c3333ba439dabf6c188e0779a179b144ff4874a1beef8ba000c76f6f2694/pytest_docker_db-0.1.0a0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "ff22e84f82b72417e70945e6e7fd6983", "sha256": "2290c723322029f5564715407dc0e6ce1f740f7805458384c8d81893e0a36a1b" }, "downloads": -1, "filename": "pytest_docker_db-0.1.0a0-py3-none-any.whl", "has_sig": false, "md5_digest": "ff22e84f82b72417e70945e6e7fd6983", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4178, "upload_time": "2018-02-19T20:25:49", "url": "https://files.pythonhosted.org/packages/d8/33/ecac93fab110c962723b7858e477c58880763e6abf367f765b72fbf58481/pytest_docker_db-0.1.0a0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "76567815062ae5bbfd0bb90c293668bc", "sha256": "33ac20c8ebb0e30a01ba4be460a2d6856d903344067a70e079ac4ccfc5abff84" }, "downloads": -1, "filename": "pytest-docker-db-0.1.0a0.tar.gz", "has_sig": false, "md5_digest": "76567815062ae5bbfd0bb90c293668bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3015, "upload_time": "2018-02-19T20:25:52", "url": "https://files.pythonhosted.org/packages/7b/6f/1aefab13b9f34235461b0702e1104f4949e250d660602865d751919b3db7/pytest-docker-db-0.1.0a0.tar.gz" } ], "0.1.1a0": [ { "comment_text": "", "digests": { "md5": "eb1f6b61d723b84259bf9f5fa75ac154", "sha256": "425bf2b0e35de5be6f4cf92f0a17f302f546251a3ca9e02aeabd2e5464ab0e40" }, "downloads": -1, "filename": "pytest_docker_db-0.1.1a0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb1f6b61d723b84259bf9f5fa75ac154", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4116, "upload_time": "2018-03-11T18:47:27", "url": "https://files.pythonhosted.org/packages/72/21/345687d556f555df1c3b04b5ba4c3760b884eeff4d2849b8e5446384d3ea/pytest_docker_db-0.1.1a0-py2.py3-none-any.whl" } ], "0.1.1a1": [ { "comment_text": "", "digests": { "md5": "1a272f78dc48160d829983c3faac9c8f", "sha256": "fb7ec0ce51c77b1fcbe2180ee70102659a85dfff658bc4df0ff2d1f39dc7820f" }, "downloads": -1, "filename": "pytest_docker_db-0.1.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "1a272f78dc48160d829983c3faac9c8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4129, "upload_time": "2018-03-11T18:53:59", "url": "https://files.pythonhosted.org/packages/45/16/1de5ed90b60c51d65949324c781698a850fde704295396ec8f319f66bbb7/pytest_docker_db-0.1.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92bcb31ae32ff30fe9f79e2b7136474b", "sha256": "02d76e70f6e3551687dbe0c3c5fa399a1c83b160398146679437756b6ce47d45" }, "downloads": -1, "filename": "pytest-docker-db-0.1.1a1.tar.gz", "has_sig": false, "md5_digest": "92bcb31ae32ff30fe9f79e2b7136474b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3012, "upload_time": "2018-03-11T18:54:00", "url": "https://files.pythonhosted.org/packages/64/1b/b268084e6e99bebc721f59983f9cbc38824f5d7e2a7a0ff13e37b22e89de/pytest-docker-db-0.1.1a1.tar.gz" } ], "0.1.1a2": [ { "comment_text": "", "digests": { "md5": "6c199bbcc64b6cca3b647c69f65eb86b", "sha256": "d1396dd6f147e06e994e99306a042145c9b6b8c161f4fe3e4621626f70c26f8e" }, "downloads": -1, "filename": "pytest_docker_db-0.1.1a2-py3-none-any.whl", "has_sig": false, "md5_digest": "6c199bbcc64b6cca3b647c69f65eb86b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4377, "upload_time": "2018-03-11T19:40:27", "url": "https://files.pythonhosted.org/packages/58/99/bdc3af1e1329f2d1e1985e54d66b3636dae15485757c91598c14cf0dbd47/pytest_docker_db-0.1.1a2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c3fdf4a73ffa49e8f055dc4dbaa7563", "sha256": "95cae71e9492768dcd9e00e5d07af16906cb424156a43826d42e04013840ab93" }, "downloads": -1, "filename": "pytest-docker-db-0.1.1a2.tar.gz", "has_sig": false, "md5_digest": "1c3fdf4a73ffa49e8f055dc4dbaa7563", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3142, "upload_time": "2018-03-11T19:40:28", "url": "https://files.pythonhosted.org/packages/69/b4/817ef32a87ac1578efc743a7fed324c59f5b6cbb13ec38337dedb53abf13/pytest-docker-db-0.1.1a2.tar.gz" } ], "0.1.1a3": [ { "comment_text": "", "digests": { "md5": "ac01ad56dc1bc61a2ccbcfd11f6f1e1a", "sha256": "67dfad7234bc089dc071ada0926be17c4eeb90c17ba204a7546fd01dc12d46ce" }, "downloads": -1, "filename": "pytest_docker_db-0.1.1a3-py3-none-any.whl", "has_sig": false, "md5_digest": "ac01ad56dc1bc61a2ccbcfd11f6f1e1a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4379, "upload_time": "2018-08-26T16:01:55", "url": "https://files.pythonhosted.org/packages/aa/5a/e1b37b22de461b7b7a6a3ef3417e18306b8d72c256b8b0e5597d3ea9a855/pytest_docker_db-0.1.1a3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f203f581517fb32f9f49351e91b09fe1", "sha256": "db441560ecb7e5251247caacca731170da2e55c27ed5b1c71e610de6fcb829e3" }, "downloads": -1, "filename": "pytest-docker-db-0.1.1a3.tar.gz", "has_sig": false, "md5_digest": "f203f581517fb32f9f49351e91b09fe1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3147, "upload_time": "2018-08-26T16:01:57", "url": "https://files.pythonhosted.org/packages/55/ab/8b7bc4f3a622ea2face2e0c8fff28ebd4207ac56fddafb06971ae52d46a0/pytest-docker-db-0.1.1a3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "7bf6ff6f95a6ce7123c3f58edc2c2201", "sha256": "fbe7079cb3d16d8b053bfa257c628971a9012820d19f8d17e05729775ba68626" }, "downloads": -1, "filename": "pytest_docker_db-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7bf6ff6f95a6ce7123c3f58edc2c2201", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6478, "upload_time": "2018-08-26T17:44:21", "url": "https://files.pythonhosted.org/packages/42/46/50ed060e9839d73fa75abb715c447ee85eddb257440afc760726038b8fc9/pytest_docker_db-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf664f745f07e4242d99912a12b671da", "sha256": "2eb0b94732b636ef7e0bcdabe0d2e142d6198963070f5a5800894b8a8d76aef3" }, "downloads": -1, "filename": "pytest-docker-db-1.0.0.tar.gz", "has_sig": false, "md5_digest": "bf664f745f07e4242d99912a12b671da", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4505, "upload_time": "2018-08-26T17:44:24", "url": "https://files.pythonhosted.org/packages/b1/42/527d704891bc48dd0b4f4828d32d1e1b0287e83bff21258d0d2f329c00a8/pytest-docker-db-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "9f36e1e8a079305b429aaffe2eccda7f", "sha256": "ca5d2954661905f821ed562a1830f33644567d259e4f5a5654238ff6bdd578b8" }, "downloads": -1, "filename": "pytest_docker_db-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9f36e1e8a079305b429aaffe2eccda7f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6479, "upload_time": "2018-08-26T18:00:37", "url": "https://files.pythonhosted.org/packages/a9/9d/80249d8c259dd0ea88246684acf469b6ad0c8b83c07c230c406916a08cbd/pytest_docker_db-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55cd837682acd15199f2b33400a0a29c", "sha256": "fc7962e1c6eff2ca3b1a5d52ff155b9de893fb0d08e94c63ad88f4b6705b427a" }, "downloads": -1, "filename": "pytest-docker-db-1.0.1.tar.gz", "has_sig": false, "md5_digest": "55cd837682acd15199f2b33400a0a29c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4506, "upload_time": "2018-08-26T18:00:39", "url": "https://files.pythonhosted.org/packages/7a/aa/942deda6b822be67f0f5476d6819e6712b5b68a3b32b8ad9eef8cd8d6025/pytest-docker-db-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "82a9e4c3d1790fc3e8d38731855977e2", "sha256": "91407f956d2e34d13da2509ad28c0bdf95f6a13a15a54a3444bc8725b217b640" }, "downloads": -1, "filename": "pytest_docker_db-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "82a9e4c3d1790fc3e8d38731855977e2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11619, "upload_time": "2018-09-15T17:06:30", "url": "https://files.pythonhosted.org/packages/3b/35/fe86b27a5d8be549f21288edeed456b004a59c7fc377d32dff7067a71af0/pytest_docker_db-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0cbc495e6c9420da1c40203eedad3956", "sha256": "90f98d911f90bad47f967adf22c2f0eed59380ffaba998431e57cbda7c775139" }, "downloads": -1, "filename": "pytest-docker-db-1.0.2.tar.gz", "has_sig": false, "md5_digest": "0cbc495e6c9420da1c40203eedad3956", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8666, "upload_time": "2018-09-15T17:06:31", "url": "https://files.pythonhosted.org/packages/25/18/cbefbee8c242cfc52d8fc9e8fc15ab0d948975fd99f95cf6f1864655a3d6/pytest-docker-db-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "c283f883b455b29dae82e58873046119", "sha256": "df85288487f556ca562e8602ca1f6335d42fd0237e946f4e8f8515a726e1af92" }, "downloads": -1, "filename": "pytest_docker_db-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c283f883b455b29dae82e58873046119", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 9533, "upload_time": "2018-09-30T18:42:00", "url": "https://files.pythonhosted.org/packages/f7/7a/a8aa8efd75b940c61e7a1db6967481e0153dc5859c19d91518f246cf6913/pytest_docker_db-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f662e99a36a278f48f3f6c4856ad3313", "sha256": "6b303690c8673a048851ac45be92e12f338c8586ce150c05442a28019fa20066" }, "downloads": -1, "filename": "pytest-docker-db-1.0.3.tar.gz", "has_sig": false, "md5_digest": "f662e99a36a278f48f3f6c4856ad3313", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10580, "upload_time": "2018-09-30T18:42:02", "url": "https://files.pythonhosted.org/packages/e8/32/a1d40a18cc9d9a0c15868fef84a84cf100439ee0a53d1c086b1ef8c4b67a/pytest-docker-db-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c283f883b455b29dae82e58873046119", "sha256": "df85288487f556ca562e8602ca1f6335d42fd0237e946f4e8f8515a726e1af92" }, "downloads": -1, "filename": "pytest_docker_db-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c283f883b455b29dae82e58873046119", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 9533, "upload_time": "2018-09-30T18:42:00", "url": "https://files.pythonhosted.org/packages/f7/7a/a8aa8efd75b940c61e7a1db6967481e0153dc5859c19d91518f246cf6913/pytest_docker_db-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f662e99a36a278f48f3f6c4856ad3313", "sha256": "6b303690c8673a048851ac45be92e12f338c8586ce150c05442a28019fa20066" }, "downloads": -1, "filename": "pytest-docker-db-1.0.3.tar.gz", "has_sig": false, "md5_digest": "f662e99a36a278f48f3f6c4856ad3313", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10580, "upload_time": "2018-09-30T18:42:02", "url": "https://files.pythonhosted.org/packages/e8/32/a1d40a18cc9d9a0c15868fef84a84cf100439ee0a53d1c086b1ef8c4b67a/pytest-docker-db-1.0.3.tar.gz" } ] }