pytest-localftpserver


Namepytest-localftpserver JSON
Version 1.2.0 PyPI version JSON
download
home_page
SummaryA PyTest plugin which provides an FTP fixture for your tests
upload_time2023-10-14 13:32:06
maintainer
docs_urlNone
author
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            PyTest FTP Server
=================


.. image:: https://img.shields.io/pypi/v/pytest_localftpserver.svg
        :target:  https://pypi.org/project/pytest-localftpserver/

.. image:: https://camo.githubusercontent.com/89b9f56d30241e30f546daf9f43653f08e920f16/68747470733a2f2f696d672e736869656c64732e696f2f636f6e64612f766e2f636f6e64612d666f7267652f7079746573742d6c6f63616c6674707365727665722e737667
        :target:  https://anaconda.org/conda-forge/pytest-localftpserver

.. image:: https://img.shields.io/pypi/pyversions/pytest_localftpserver.svg
    :target: https://pypi.org/project/pytest/

.. image:: https://github.com/oz123/pytest-localftpserver/workflows/Tests/badge.svg
        :target: https://github.com/oz123/pytest-localftpserver/actions?query=workflow%3ATests

.. image:: https://readthedocs.org/projects/pytest-localftpserver/badge/?version=latest
        :target: https://pytest-localftpserver.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

.. image:: https://coveralls.io/repos/github/oz123/pytest-localftpserver/badge.svg
        :target: https://coveralls.io/github/oz123/pytest-localftpserver
        :alt: Coverage


A PyTest plugin which provides an FTP fixture for your tests


* Free software: MIT license
* Documentation: https://pytest-localftpserver.readthedocs.io/en/latest/index.html

Attention!
----------

As of version ``1.0.0`` the support for python 2.7 and 3.4 was dropped.
If you need to support those versions you should pin the version to ``0.6.0``,
i.e. add the following lines to your "requirements_dev.txt"::

        # pytest_localftpserver==0.6.0
        https://github.com/oz123/pytest-localftpserver/archive/v0.6.0.zip


Usage Quickstart:
-----------------

This Plugin provides the fixtures ``ftpserver`` and ``ftpserver_TLS``,
which are threaded instances of a FTP server, with which you can upload files and test FTP
functionality. It can be configured using the following environment variables:

=====================   =============================================================================
Environment variable    Usage
=====================   =============================================================================
``FTP_USER``            Username of the registered user.
``FTP_PASS``            Password of the registered user.
``FTP_PORT``            Port for the normal ftp server to run on.
``FTP_HOME``            Home folder (host system) of the registered user.
``FTP_FIXTURE_SCOPE``   Scope/lifetime of the fixture.
``FTP_PORT_TLS``        Port for the TLS ftp server to run on.
``FTP_HOME_TLS``        Home folder (host system) of the registered user, used by the TLS ftp server.
``FTP_CERTFILE``        Certificate (host system) to be used by the TLS ftp server.
=====================   =============================================================================


See the `tests directory <https://github.com/oz123/pytest-localftpserver/tree/master/tests>`_
or the
`documentation <https://pytest-localftpserver.readthedocs.io/en/latest/usage.html>`_
for examples.

You can either set environment variables on a system level or use tools such as
`pytest-env <https://pypi.org/project/pytest-env/>`_ or
`tox <https://pypi.org/project/tox/>`_, to change the default settings of this plugin.
Sample config for pytest-cov::

    $ cat pytest.ini
    [pytest]
    env =
        FTP_USER=benz
        FTP_PASS=erni1
        FTP_HOME = /home/ftp_test
        FTP_PORT=31175
        FTP_FIXTURE_SCOPE=function
        # only affects ftpserver_TLS
        FTP_PORT_TLS = 31176
        FTP_HOME_TLS = /home/ftp_test_TLS
        FTP_CERTFILE = ./tests/test_keycert.pem


Sample config for Tox::

    $ cat tox.ini
    [tox]
    envlist = py{36,37,38,39,310}

    [testenv]
    setenv =
        FTP_USER=benz
        FTP_PASS=erni1
        FTP_HOME = {envtmpdir}
        FTP_PORT=31175
        FTP_FIXTURE_SCOPE=function
        # only affects ftpserver_TLS
        FTP_PORT_TLS = 31176
        FTP_HOME_TLS = /home/ftp_test_TLS
        FTP_CERTFILE = {toxinidir}/tests/test_keycert.pem
    commands =
        pytest tests

Credits
-------

This package was inspired by,  https://pypi.org/project/pytest-localserver/
made by Sebastian Rahlf, which lacks an FTP server.

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/cookiecutter/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pytest-localftpserver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Oz N Tiram <oz.tiram@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c1/66/341dc3e965b62abf78d32f30eb462441cd189348af6a911acc0e501c7175/pytest_localftpserver-1.2.0.tar.gz",
    "platform": null,
    "description": "PyTest FTP Server\n=================\n\n\n.. image:: https://img.shields.io/pypi/v/pytest_localftpserver.svg\n        :target:  https://pypi.org/project/pytest-localftpserver/\n\n.. image:: https://camo.githubusercontent.com/89b9f56d30241e30f546daf9f43653f08e920f16/68747470733a2f2f696d672e736869656c64732e696f2f636f6e64612f766e2f636f6e64612d666f7267652f7079746573742d6c6f63616c6674707365727665722e737667\n        :target:  https://anaconda.org/conda-forge/pytest-localftpserver\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest_localftpserver.svg\n    :target: https://pypi.org/project/pytest/\n\n.. image:: https://github.com/oz123/pytest-localftpserver/workflows/Tests/badge.svg\n        :target: https://github.com/oz123/pytest-localftpserver/actions?query=workflow%3ATests\n\n.. image:: https://readthedocs.org/projects/pytest-localftpserver/badge/?version=latest\n        :target: https://pytest-localftpserver.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://coveralls.io/repos/github/oz123/pytest-localftpserver/badge.svg\n        :target: https://coveralls.io/github/oz123/pytest-localftpserver\n        :alt: Coverage\n\n\nA PyTest plugin which provides an FTP fixture for your tests\n\n\n* Free software: MIT license\n* Documentation: https://pytest-localftpserver.readthedocs.io/en/latest/index.html\n\nAttention!\n----------\n\nAs of version ``1.0.0`` the support for python 2.7 and 3.4 was dropped.\nIf you need to support those versions you should pin the version to ``0.6.0``,\ni.e. add the following lines to your \"requirements_dev.txt\"::\n\n        # pytest_localftpserver==0.6.0\n        https://github.com/oz123/pytest-localftpserver/archive/v0.6.0.zip\n\n\nUsage Quickstart:\n-----------------\n\nThis Plugin provides the fixtures ``ftpserver`` and ``ftpserver_TLS``,\nwhich are threaded instances of a FTP server, with which you can upload files and test FTP\nfunctionality. It can be configured using the following environment variables:\n\n=====================   =============================================================================\nEnvironment variable    Usage\n=====================   =============================================================================\n``FTP_USER``            Username of the registered user.\n``FTP_PASS``            Password of the registered user.\n``FTP_PORT``            Port for the normal ftp server to run on.\n``FTP_HOME``            Home folder (host system) of the registered user.\n``FTP_FIXTURE_SCOPE``   Scope/lifetime of the fixture.\n``FTP_PORT_TLS``        Port for the TLS ftp server to run on.\n``FTP_HOME_TLS``        Home folder (host system) of the registered user, used by the TLS ftp server.\n``FTP_CERTFILE``        Certificate (host system) to be used by the TLS ftp server.\n=====================   =============================================================================\n\n\nSee the `tests directory <https://github.com/oz123/pytest-localftpserver/tree/master/tests>`_\nor the\n`documentation <https://pytest-localftpserver.readthedocs.io/en/latest/usage.html>`_\nfor examples.\n\nYou can either set environment variables on a system level or use tools such as\n`pytest-env <https://pypi.org/project/pytest-env/>`_ or\n`tox <https://pypi.org/project/tox/>`_, to change the default settings of this plugin.\nSample config for pytest-cov::\n\n    $ cat pytest.ini\n    [pytest]\n    env =\n        FTP_USER=benz\n        FTP_PASS=erni1\n        FTP_HOME = /home/ftp_test\n        FTP_PORT=31175\n        FTP_FIXTURE_SCOPE=function\n        # only affects ftpserver_TLS\n        FTP_PORT_TLS = 31176\n        FTP_HOME_TLS = /home/ftp_test_TLS\n        FTP_CERTFILE = ./tests/test_keycert.pem\n\n\nSample config for Tox::\n\n    $ cat tox.ini\n    [tox]\n    envlist = py{36,37,38,39,310}\n\n    [testenv]\n    setenv =\n        FTP_USER=benz\n        FTP_PASS=erni1\n        FTP_HOME = {envtmpdir}\n        FTP_PORT=31175\n        FTP_FIXTURE_SCOPE=function\n        # only affects ftpserver_TLS\n        FTP_PORT_TLS = 31176\n        FTP_HOME_TLS = /home/ftp_test_TLS\n        FTP_CERTFILE = {toxinidir}/tests/test_keycert.pem\n    commands =\n        pytest tests\n\nCredits\n-------\n\nThis package was inspired by,  https://pypi.org/project/pytest-localserver/\nmade by Sebastian Rahlf, which lacks an FTP server.\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/cookiecutter/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A PyTest plugin which provides an FTP fixture for your tests",
    "version": "1.2.0",
    "project_urls": {
        "homepage": "https://github.com/oz123/pytest-localftpserver"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5108ce99fae916232db777bd20d685d35c7649a3f316c86a96d6490b3e768a69",
                "md5": "acbdf23b5e9cb9b7820d494b9f3c4259",
                "sha256": "7f92af7ef172bb282e5c2f3c62ae78f1c49f93edd8b52be3b5f54aa5e487acb3"
            },
            "downloads": -1,
            "filename": "pytest_localftpserver-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "acbdf23b5e9cb9b7820d494b9f3c4259",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21862,
            "upload_time": "2023-10-14T13:31:59",
            "upload_time_iso_8601": "2023-10-14T13:31:59.466576Z",
            "url": "https://files.pythonhosted.org/packages/51/08/ce99fae916232db777bd20d685d35c7649a3f316c86a96d6490b3e768a69/pytest_localftpserver-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c166341dc3e965b62abf78d32f30eb462441cd189348af6a911acc0e501c7175",
                "md5": "cc9d3785fbe6ba2f3d2e836a8f59a407",
                "sha256": "099512c3d8a1ca24808df31d85b426d8653ca6f178d6d8f3c1898d302c053b3e"
            },
            "downloads": -1,
            "filename": "pytest_localftpserver-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cc9d3785fbe6ba2f3d2e836a8f59a407",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 48817,
            "upload_time": "2023-10-14T13:32:06",
            "upload_time_iso_8601": "2023-10-14T13:32:06.434493Z",
            "url": "https://files.pythonhosted.org/packages/c1/66/341dc3e965b62abf78d32f30eb462441cd189348af6a911acc0e501c7175/pytest_localftpserver-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-14 13:32:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oz123",
    "github_project": "pytest-localftpserver",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-localftpserver"
}
        
Elapsed time: 0.12453s