fw-http-testserver


Namefw-http-testserver JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://gitlab.com/flywheel-io/tools/lib/fw-http-testserver
SummaryHTTP test server for mocking services
upload_time2024-11-19 13:10:22
maintainerNone
docs_urlNone
authorFlywheel
requires_python<4.0,>=3.9
licenseMIT
keywords flywheel http server test testing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fw-http-testserver

HTTP test server for stubbing / mocking 3rd party services.

## Installation

Add as a `poetry` dev dependency to your project:

```bash
poetry add --dev fw-http-testserver
```

## Usage

```python
import requests
pytest_plugins = "fw_http_testserver"

def test_my_app(http_testserver):
    http_testserver.add_response("/path", {"foo": "bar"})
    resp = requests.get(f"{http_testserver.url}/path")
    assert resp.json() == {"foo": "bar"}
```

## Development

Install the project using `poetry` and enable `pre-commit`:

```bash
poetry install
pre-commit install
```

## License

[![MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/flywheel-io/tools/lib/fw-http-testserver",
    "name": "fw-http-testserver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "Flywheel, HTTP, server, test, testing",
    "author": "Flywheel",
    "author_email": "support@flywheel.io",
    "download_url": null,
    "platform": null,
    "description": "# fw-http-testserver\n\nHTTP test server for stubbing / mocking 3rd party services.\n\n## Installation\n\nAdd as a `poetry` dev dependency to your project:\n\n```bash\npoetry add --dev fw-http-testserver\n```\n\n## Usage\n\n```python\nimport requests\npytest_plugins = \"fw_http_testserver\"\n\ndef test_my_app(http_testserver):\n    http_testserver.add_response(\"/path\", {\"foo\": \"bar\"})\n    resp = requests.get(f\"{http_testserver.url}/path\")\n    assert resp.json() == {\"foo\": \"bar\"}\n```\n\n## Development\n\nInstall the project using `poetry` and enable `pre-commit`:\n\n```bash\npoetry install\npre-commit install\n```\n\n## License\n\n[![MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "HTTP test server for mocking services",
    "version": "1.2.3",
    "project_urls": {
        "Documentation": "https://gitlab.com/flywheel-io/tools/lib/fw-http-testserver",
        "Homepage": "https://gitlab.com/flywheel-io/tools/lib/fw-http-testserver",
        "Repository": "https://gitlab.com/flywheel-io/tools/lib/fw-http-testserver"
    },
    "split_keywords": [
        "flywheel",
        " http",
        " server",
        " test",
        " testing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31961853451714321278a0d6bfd346203f5fe78566d1d5958bbaeb53a1516121",
                "md5": "525d3c676fa33ce9268a671d2793902e",
                "sha256": "327abc939f6b3261a48026cf84c48ee5bd68c2a1ceeb43679051e4aab7b074f6"
            },
            "downloads": -1,
            "filename": "fw_http_testserver-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "525d3c676fa33ce9268a671d2793902e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 4346,
            "upload_time": "2024-11-19T13:10:22",
            "upload_time_iso_8601": "2024-11-19T13:10:22.691774Z",
            "url": "https://files.pythonhosted.org/packages/31/96/1853451714321278a0d6bfd346203f5fe78566d1d5958bbaeb53a1516121/fw_http_testserver-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-19 13:10:22",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "flywheel-io",
    "gitlab_project": "tools",
    "lcname": "fw-http-testserver"
}
        
Elapsed time: 0.62354s