{"id":13772000,"url":"https://github.com/pytest-dev/pytest-mimesis","last_synced_at":"2025-05-11T04:31:06.106Z","repository":{"id":51266805,"uuid":"82219691","full_name":"pytest-dev/pytest-mimesis","owner":"pytest-dev","description":"Mimesis integration with the pytest test runner. This plugin provider useful fixtures based on providers from Mimesis.","archived":true,"fork":false,"pushed_at":"2024-01-31T14:22:47.000Z","size":199,"stargazers_count":62,"open_issues_count":4,"forks_count":4,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-18T02:46:57.550Z","etag":null,"topics":["fake-data","faker","fixtures","mimesis","plugin","pytest","pytest-mimesis","pytest-plugin","testing","testing-tools"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pytest-mimesis/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pytest-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"sobolevn"}},"created_at":"2017-02-16T19:48:55.000Z","updated_at":"2024-01-31T14:24:26.000Z","dependencies_parsed_at":"2024-08-03T17:16:05.420Z","dependency_job_id":null,"html_url":"https://github.com/pytest-dev/pytest-mimesis","commit_stats":{"total_commits":81,"total_committers":9,"mean_commits":9.0,"dds":0.5802469135802469,"last_synced_commit":"f6e1c5b2c7fcf6cf6da9009a77921997877ddbbf"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-mimesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-mimesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-mimesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-mimesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytest-dev","download_url":"https://codeload.github.com/pytest-dev/pytest-mimesis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fake-data","faker","fixtures","mimesis","plugin","pytest","pytest-mimesis","pytest-plugin","testing","testing-tools"],"created_at":"2024-08-03T17:00:58.643Z","updated_at":"2025-05-11T04:31:04.878Z","avatar_url":"https://github.com/pytest-dev.png","language":"Python","funding_links":["https://patreon.com/sobolevn"],"categories":["Plugins"],"sub_categories":[],"readme":"# ⛔️ DEPRECATED\n\nThis repository is now deprecated. We have integrated `pytest-mimesis` into mimesis itself, and there is no longer a need to use a separate package. Refer to the [Integration with Pytest](https://mimesis.name/en/v14.0.0/pytest_plugin.html) section for more details.\n\n\n## pytest-mimesis\n\n[![test](https://github.com/pytest-dev/pytest-mimesis/actions/workflows/test.yml/badge.svg)](https://github.com/pytest-dev/pytest-mimesis/actions/workflows/test.yml)\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\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\nAnd your test file:\n\n```python\n# tests/test_email.py\n\nfrom your_module import validate_email\n\ndef test_validate_email(mimesis):\n    assert validate_email(mimesis('email'))\n```\n\nYou can also specify 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\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## Related projects\n\nYou might also be interested in:\n\n- [mimesis](https://github.com/lk-geimfari/mimesis) itself, it is awesome!\n- [mimesis-factory](https://github.com/mimesis-lab/mimesis-factory) which brings `factory_boy` integration to `mimesis`\n\n\n## License\n\npytest-mimesis is licensed under the [MIT License](https://github.com/pytest-dev/pytest-mimesis/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-mimesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytest-dev%2Fpytest-mimesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-mimesis/lists"}