{ "info": { "author": "Nikita Sobolev", "author_email": "mail@sobolevn.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "## pytest-mimesis\n\n\n[![Build Status](https://travis-ci.org/pytest-dev/pytest-mimesis.svg?branch=master)](https://travis-ci.org/pytest-dev/pytest-mimesis)\n[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)\n[![Python Version](https://img.shields.io/pypi/pyversions/pytest-mimesis.svg)](https://pypi.org/project/pytest-mimesis/)\n\n**pytest-mimesis** is a pytest plugin that provides pytest fixtures for [Mimesis](https://github.com/lk-geimfari/mimesis) providers. This allows you to quickly and easily use randomized, dummy data as part of your test suite.\n\n\n## Installation\n\n```bash\npip install pytest-mimesis\n```\n\n## Examples\n\nUsing the personal provider as part of a test.\n\n```python\n# your_module/__init__.py\n\ndef validate_email(email):\n # code that validates an e-mail address\n return True\n```\n\n`tests/test_email.py`:\n\n```python\nfrom your_module import validate_email\n\ndef test_validate_email(mimesis):\n assert validate_email(mimesis('email'))\n```\n\nSpecifying locales:\n\n```python\n@pytest.mark.parameterize('mimesis_locale', 'de') # use German locale\ndef test_create_user(mimesis):\n assert create_user(name=mimesis('full_name'))\n\n\n@pytest.mark.parameterize('mimesis_locale', ['de', 'en', 'jp']) # test multiple locales\ndef test_add_phone(user, mimesis):\n assert user.add_phone_number(name=mimesis('full_name'))\n```\n\n## Fixtures\n\nWe provide two public fixtures: `mimesis_locale` and `mimesis`.\nWhile `mimesis_locale` is just a string (like: `en`, `ru`),\n`mimesis` is an instance of `mimesis.schema.Field`.\n\nWe use caching of `mimesis` instances for different locales for the whole\ntest session, so creating new instances is cheap.\n\n\n## License\n\npytest-mimesis is licensed under the [MIT License](https://github.com/pytest-dev/pytest-mimesis/blob/master/LICENSE).\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pytest-dev/pytest-mimesis", "keywords": "mimesis,pytest,testing,fixtures,fake data,faker,factory,tests", "license": "MIT", "maintainer": "Nikita Sobolev", "maintainer_email": "mail@sobolevn.me", "name": "pytest-mimesis", "package_url": "https://pypi.org/project/pytest-mimesis/", "platform": "", "project_url": "https://pypi.org/project/pytest-mimesis/", "project_urls": { "Homepage": "https://github.com/pytest-dev/pytest-mimesis", "Repository": "https://github.com/pytest-dev/pytest-mimesis" }, "release_url": "https://pypi.org/project/pytest-mimesis/1.0.1/", "requires_dist": [ "pytest (>=4.2)", "mimesis (>=3.1,<4.0)" ], "requires_python": ">=3.6,<4.0", "summary": "Mimesis integration with the pytest test runner", "version": "1.0.1" }, "last_serial": 5668559, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "223db1c353aa1e019741d2922e21f130", "sha256": "5768258731fe4cc3eebe0652829178c89295a158ec9b78633889667d6d772fc2" }, "downloads": -1, "filename": "pytest_mimesis-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "223db1c353aa1e019741d2922e21f130", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4.0", "size": 4121, "upload_time": "2018-06-17T10:39:30", "url": "https://files.pythonhosted.org/packages/71/34/1cee5121c9abea232add06a6242085900d2de7882eb1042fd5495ccd3683/pytest_mimesis-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9cc25d3546772306f14ebe1b14ce30a", "sha256": "fac8bcb7952e5751ab0e0b20ab61a76d02831d286a66ed0963c9c19e8858e63b" }, "downloads": -1, "filename": "pytest_mimesis-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e9cc25d3546772306f14ebe1b14ce30a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4.0", "size": 3080, "upload_time": "2018-06-17T10:39:31", "url": "https://files.pythonhosted.org/packages/14/3d/b844aceb3338d260cc34994dbe5436d43742cfab6a0d9c5dfaf22b49c864/pytest_mimesis-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "b5d40f2f0e5415b2c40c4c247c298df9", "sha256": "a4e22c33b7209fff9af02131a48a771c55bbd68a0492f9044e2961e8dc69f2f7" }, "downloads": -1, "filename": "pytest_mimesis-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b5d40f2f0e5415b2c40c4c247c298df9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4241, "upload_time": "2019-03-09T08:23:11", "url": "https://files.pythonhosted.org/packages/df/bf/1291f7d870e9792e81ddebebbbc9fffa428c0bfd08cc60cfd5b86b909a84/pytest_mimesis-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "89f4837961875a480fc1c8fd3c6b5117", "sha256": "17e34630eb9c955de68f42a9127f552e5704530de27779edf020e6cfd44e878d" }, "downloads": -1, "filename": "pytest_mimesis-1.0.0.tar.gz", "has_sig": false, "md5_digest": "89f4837961875a480fc1c8fd3c6b5117", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3187, "upload_time": "2019-03-09T08:23:13", "url": "https://files.pythonhosted.org/packages/74/a8/1bb9ab8a49d31868c702ed160efca3881fd281c0165be9e77c58a3e5e690/pytest_mimesis-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f19b61d2103f600d1cee3f4e09275ce5", "sha256": "9de64b37f97707078b72a31bb868cf5676586b581cd25cabfdd8d1e35c41d90f" }, "downloads": -1, "filename": "pytest_mimesis-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f19b61d2103f600d1cee3f4e09275ce5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4287, "upload_time": "2019-08-12T20:11:56", "url": "https://files.pythonhosted.org/packages/4f/b7/363d3067e31fb8fd3ab5b12ddcca7dec20fac770c15bb700923c78d9ab16/pytest_mimesis-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2e9db3146f791b6aee9d1cc77dc6d00", "sha256": "8d7f80a9a9a3b0b903efc857ebf8f45af4a312a1b99ee078be63c2de903824d9" }, "downloads": -1, "filename": "pytest_mimesis-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f2e9db3146f791b6aee9d1cc77dc6d00", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3249, "upload_time": "2019-08-12T20:11:57", "url": "https://files.pythonhosted.org/packages/c6/3f/391a6b94e41312517f92214afff2a6a6057dd81693ce4eefe9972dda689b/pytest_mimesis-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f19b61d2103f600d1cee3f4e09275ce5", "sha256": "9de64b37f97707078b72a31bb868cf5676586b581cd25cabfdd8d1e35c41d90f" }, "downloads": -1, "filename": "pytest_mimesis-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f19b61d2103f600d1cee3f4e09275ce5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4287, "upload_time": "2019-08-12T20:11:56", "url": "https://files.pythonhosted.org/packages/4f/b7/363d3067e31fb8fd3ab5b12ddcca7dec20fac770c15bb700923c78d9ab16/pytest_mimesis-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2e9db3146f791b6aee9d1cc77dc6d00", "sha256": "8d7f80a9a9a3b0b903efc857ebf8f45af4a312a1b99ee078be63c2de903824d9" }, "downloads": -1, "filename": "pytest_mimesis-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f2e9db3146f791b6aee9d1cc77dc6d00", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3249, "upload_time": "2019-08-12T20:11:57", "url": "https://files.pythonhosted.org/packages/c6/3f/391a6b94e41312517f92214afff2a6a6057dd81693ce4eefe9972dda689b/pytest_mimesis-1.0.1.tar.gz" } ] }