pytest-smtp-test-server


Namepytest-smtp-test-server JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://git.codebau.dev/pytest-plugins/pytest-smtp-test-server
Summarypytest plugin for using `smtp-test-server` as a fixture
upload_time2023-12-03 09:43:46
maintainer
docs_urlNone
authorJuergen Edelbluth
requires_python>=3.11,<4.0
licenseMIT
keywords py.test pytest pytest-plugin mail smtp mock fixture
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest-smtp-test-server

pytest plugin for using [`smtp-test-server`](https://git.codebau.dev/jed/smtp-test-server) as pytest mock fixtures.

## Installation

### Installation with "pip"

```Bash
pip install pytest-smtp-test-server
```

### Installation with "poetry"

```Bash
poetry add --group dev pytest-smtp-test-server
```

## Usage

After installation, one could easily use one of the provided fixtures in your pytest test case:

```Python
def test_mail_sending(smtp_mock):
    my_mail_sending_method(host=smtp_mock.host, port=smtp_mock.port)
    assert len(smtp_mock.messages) == 1
```

## Scopes

Fixtures are provided for different [pytest fixture scopes](https://docs.pytest.org/en/stable/explanation/fixtures.html)
for your convenience:

| fixture name          | pytest fixture scope |
|-----------------------|----------------------|
| `smtp_mock`           | function             |
| `class_smtp_mock`     | class                |
| `module_smtp_mock`    | module               |
| `package_smtp_mock`   | package              |
| `session_smtp_mock`   | session              |

If you require more control over hosts and ports, consider using
[`smtp-test-server`](https://git.codebau.dev/jed/smtp-test-server) directly.

            

Raw data

            {
    "_id": null,
    "home_page": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server",
    "name": "pytest-smtp-test-server",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "py.test,pytest,pytest-plugin,mail,smtp,mock,fixture",
    "author": "Juergen Edelbluth",
    "author_email": "pytest-smtp-test-server@jued.de",
    "download_url": "https://files.pythonhosted.org/packages/2c/c6/b79c6229fcd823a3a2f0e150eb011ce73ff321840356088b409a48812d59/pytest_smtp_test_server-0.1.1.tar.gz",
    "platform": null,
    "description": "# pytest-smtp-test-server\n\npytest plugin for using [`smtp-test-server`](https://git.codebau.dev/jed/smtp-test-server) as pytest mock fixtures.\n\n## Installation\n\n### Installation with \"pip\"\n\n```Bash\npip install pytest-smtp-test-server\n```\n\n### Installation with \"poetry\"\n\n```Bash\npoetry add --group dev pytest-smtp-test-server\n```\n\n## Usage\n\nAfter installation, one could easily use one of the provided fixtures in your pytest test case:\n\n```Python\ndef test_mail_sending(smtp_mock):\n    my_mail_sending_method(host=smtp_mock.host, port=smtp_mock.port)\n    assert len(smtp_mock.messages) == 1\n```\n\n## Scopes\n\nFixtures are provided for different [pytest fixture scopes](https://docs.pytest.org/en/stable/explanation/fixtures.html)\nfor your convenience:\n\n| fixture name          | pytest fixture scope |\n|-----------------------|----------------------|\n| `smtp_mock`           | function             |\n| `class_smtp_mock`     | class                |\n| `module_smtp_mock`    | module               |\n| `package_smtp_mock`   | package              |\n| `session_smtp_mock`   | session              |\n\nIf you require more control over hosts and ports, consider using\n[`smtp-test-server`](https://git.codebau.dev/jed/smtp-test-server) directly.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "pytest plugin for using `smtp-test-server` as a fixture",
    "version": "0.1.1",
    "project_urls": {
        "Changelog": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server/CHANGELOG.md",
        "Documentation": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server/",
        "Homepage": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server",
        "Issue Tracker": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server/issues",
        "Releases": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server/releases",
        "Repository": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server",
        "Wiki": "https://git.codebau.dev/pytest-plugins/pytest-smtp-test-server/wiki"
    },
    "split_keywords": [
        "py.test",
        "pytest",
        "pytest-plugin",
        "mail",
        "smtp",
        "mock",
        "fixture"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d1cb6934952fa8e9dc6e776fd4519923935badde4b9b816fc4511a403206a95",
                "md5": "6de0564b82be22ff8c8c42ea5bd3b755",
                "sha256": "f6065b184e182078f89c201aa30bd33d8c8abe5194f7c5ddfea92e525be5b566"
            },
            "downloads": -1,
            "filename": "pytest_smtp_test_server-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6de0564b82be22ff8c8c42ea5bd3b755",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 5990,
            "upload_time": "2023-12-03T09:43:43",
            "upload_time_iso_8601": "2023-12-03T09:43:43.891380Z",
            "url": "https://files.pythonhosted.org/packages/1d/1c/b6934952fa8e9dc6e776fd4519923935badde4b9b816fc4511a403206a95/pytest_smtp_test_server-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2cc6b79c6229fcd823a3a2f0e150eb011ce73ff321840356088b409a48812d59",
                "md5": "1f5088cc0e487d9a783358735d31af8e",
                "sha256": "839fb60ebde6f1adec2668cabc2e85c0624e8a857ebde2bdaad5d6234d897190"
            },
            "downloads": -1,
            "filename": "pytest_smtp_test_server-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1f5088cc0e487d9a783358735d31af8e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 4707,
            "upload_time": "2023-12-03T09:43:46",
            "upload_time_iso_8601": "2023-12-03T09:43:46.038886Z",
            "url": "https://files.pythonhosted.org/packages/2c/c6/b79c6229fcd823a3a2f0e150eb011ce73ff321840356088b409a48812d59/pytest_smtp_test_server-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-03 09:43:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pytest-smtp-test-server"
}
        
Elapsed time: 0.49195s