pytest-docker-squid-fixtures


Namepytest-docker-squid-fixtures JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/crashvb/pytest-docker-squid-fixtures
SummaryPytest fixtures for testing with squid.
upload_time2024-08-12 23:51:16
maintainerNone
docs_urlNone
authorRichard Davis
requires_pythonNone
licenseApache License 2.0
keywords docker fixtures pytest squid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest-docker-squid-fixtures

[![pypi version](https://img.shields.io/pypi/v/pytest-docker-squid-fixtures.svg)](https://pypi.org/project/pytest-docker-squid-fixtures)
[![build status](https://github.com/crashvb/pytest-docker-squid-fixtures/actions/workflows/main.yml/badge.svg)](https://github.com/crashvb/pytest-docker-squid-fixtures/actions)
[![coverage status](https://coveralls.io/repos/github/crashvb/pytest-docker-squid-fixtures/badge.svg)](https://coveralls.io/github/crashvb/pytest-docker-squid-fixtures)
[![python versions](https://img.shields.io/pypi/pyversions/pytest-docker-squid-fixtures.svg?logo=python&logoColor=FBE072)](https://pypi.org/project/pytest-docker-squid-fixtures)
[![linting](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![license](https://img.shields.io/github/license/crashvb/pytest-docker-squid-fixtures.svg)](https://github.com/crashvb/pytest-docker-squid-fixtures/blob/master/LICENSE.md)

## Overview

Pytest fixtures to instantiate and utilize local squid docker containers, using [lovely-pytest-docker](https://pypi.org/project/lovely-pytest-docker) and [docker-py](https://pypi.org/project/docker-py), for testing.

## Getting Started

Update <tt>setup.py</tt> to include:

```python
from distutils.core import setup

setup(
	tests_require=["pytest-docker-squid-fixtures"]
)
```

All fixtures should be automatically included via the <tt>pytest11</tt> entry point.
```python
import requests
import pytest
from pytest_docker_squid_fixtures import SquidInsecure, SquidSecure  # Optional, for typing

def test_squid_secure(squid_secure: SquidSecure):
    response = requests.head(f"https://{squid_secure.endpoint}/",
        headers=squid_secure.auth_header,
        verify=str(squid_secure.cacerts),
    )
    assert response.status_code == 200

def test_squid_insecure(squid_insecure: SquidInsecure):
    response = requests.head(f"http://{squid_insecure.endpoint}/")
    assert response.status_code == 200
```

The `push_image` mark can optionally be added to stage images in the squid prior to testing. See [Markers](#markers) for details.

## Installation
### From [pypi.org](https://pypi.org/project/pytest-docker-squid-fixtures/)

```
$ pip install pytest_docker_squid_fixtures
```

### From source code

```bash
$ git clone https://github.com/crashvb/pytest-docker-squid-fixtures
$ cd pytest-docker-squid-fixtures
$ virtualenv env
$ source env/bin/activate
$ python -m pip install --editable .[dev]
```

## <a name="fixtures"></a>Fixtures

### <a name="squid_auth_header"></a> squid_auth_header

Retrieves an HTTP basic authentication header that is populated with credentials that can access the secure squid service. The credentials are retrieved from the [squid_password](#squid_password) and [squid_username](#squid_username) fixtures. This fixture is used to replicate docker images into the secure squid service.

### <a name="squid_cacerts"></a> squid_cacerts

Locates a user-defined CA trust store (<tt>tests/cacerts</tt>) to use to verify connections to the secure squid service. If one cannot be located, a temporary trust store is created containing certificates from <tt>certifi</tt> and the [squid_certs](#squid_certs) fixture. This fixture is used to instantiate the secure squid service.

### <a name="squid_certs"></a> squid_certs

Returns the paths of the self-signed certificate authority certificate, certificate, and private key that are used by the secure squid service. This fixture is used to instantiate the secure squid service.

#### NamedTuple Fields

The following fields are defined in the tuple provided by this fixture:

* **ca_certificate** - Path to the self-signed certificate authority certificate.
* **ca_private_key** - Path to the self-signed certificate authority private key.
* **certificate** - Path to the certificate.
* **private_key** - Path to the private key.

Typing is provided by `pytest_docker_squid_fixtures.SquidCerts`.

### <a name="squid_hwpasswd"></a> squid_htpasswd

Provides the path to a htpasswd file that is used by the secure squid service. If a user-defined htpasswd file (<tt>tests/htpasswd</tt>) can be located, it is used. Otherwise, a temporary htpasswd file is created using credentials from the [squid_password](#squid_password) and [squid_username](#squid_username) fixtures. This fixture is used to instantiate the secure squid ervice.

### <a name="squid_squidcfg_insecure"></a> squid_squidcfg_insecure

Provides the path to an insecure squid.cfg file that is used by the insecure squid service. If a user-defined squid.cfg file (<tt>tests/squid.insecure.cfg</tt>) can be located, it is used. Otherwise, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the insecure squid service.

### <a name="squid_squidcfg_secure"></a> squid_squidcfg_secure

Provides the path to a secure squid.cfg file that is used by the secure squid service. If a user-defined squid.cfg file (<tt>tests/squid.secure.cfg</tt>) can be located, it is used. Otherwise, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the secure squid service.

### <a name="squid_insecure"></a> squid_insecure

Configures and instantiates a squid service without TLS or authentication.

```python
import requests
from pytest_docker_squid_fixtures import SquidInsecure  # Optional, for typing

def test_squid_insecure(squid_insecure: SquidInsecure):
    response = requests.head(f"http://{squid_insecure.endpoint}/")
    assert response.status_code == 200
```

#### NamedTuple Fields

The following fields are defined in the tuple provided by this fixture:

* **docker_compose** - Path to the fully instantiated docker-compose configuration.
* **endpoint** - Endpoint of the insecure squid service.
* **endpoint_name** - Endpoint of the insecure squid service, by service name.
* **service_name** - Name of the service within the docker-compose configuration.

Typing is provided by `pytest_docker_squid_fixtures.SquidInsecure`.

### <a name="squid_password"></a> squid_password

Provides a generated password to use for authentication to the secure squid service. This fixture is used to replicate docker images into the secure squid service.

### <a name="squid_secure"></a> squid_secure

Configures and instantiates a TLS enabled squid service with HTTP basic authorization.

```python
import requests
from pytest_docker_squid_fixtures import SquidSecure  # Optional, for typing

def test_squid_secure(squid_secure: SquidSecure):
    response = requests.head(
        f"https://{squid_secure.endpoint}/",
        headers=squid_secure.auth_header,
        verify=str(squid_secure.cacerts),
    )
    assert response.status_code == 200
```

#### NamedTuple Fields

The following fields are defined in the tuple provided by this fixture:

* **auth_header** - from [squid_auth_header](#squid_auth_header).
* **cacerts** - from [squid_cacerts](#squid_cacerts).
* **certs** - from [squid_certs](#squid_certs).
* **docker_compose** - Path to the fully instantiated docker-compose configuration.
* **endpoint** - Endpoint of the secure squid service.
* **endpoint_name** - Endpoint of the secure squid service, by service name.
* **htpasswd** - from [squid_htpasswd](#squid_htpasswd)
* **password** - from [squid_password](#squid_password).
* **service_name** - Name of the service within the docker-compose configuration.
* **ssl_context** - from [squid_ssl_context](#squid_ssl_context).
* **username** - from [squid_username](#squid_username).

Typing is provided by `pytest_docker_squid_fixtures.SquidSecure`.

### <a name="squid_ssl_context"></a> squid_ssl_context

Provides an SSL context containing the CA trust store from the  [squid_cacerts](#squid_cacerts) fixture. This fixture is used to instantiate the secure squid service.

### <a name="squid_username"></a> squid_username

Provides a generated username to use for authentication to the secure squid service. This fixture is used to replicate docker images into the secure squid service.

### <a name="pdsf_docker_compose_insecure"></a> pdsf_docker_compose_insecure

This fixture uses the `docker_compose_files` fixture to locate a user-defined docker-compose configuration file (typically <tt>tests/docker-compose.yml</tt>) that contains the <tt>pytest-docker-squid-insecure</tt> service. If one cannot be located, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the insecure squid service. The configuration will be treated as a template; the <tt>$PATH_SQUIDCFG</tt> token will be populated with the absolute path provided by the [squid_squidcfg](#squid_squidcfg) fixture.

### <a name="pdsf_docker_compose_secure"></a> pdsf_docker_compose_secure

This fixture uses the `docker_compose_files` fixture to locate a user-defined docker-compose configuration file (typically <tt>tests/docker-compose.yml</tt>) that contains the <tt>pytest-docker-squid-secure</tt> service. If one cannot be located, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the secure squid service. The configuration will be treated as a template; the <tt>$PATH_CERTIFICATE</tt>, <tt>$PATH_HTPASSWD</tt>, <tt>$PATH_KEY</tt>, and <tt>$PATH_SQUIDCFG</tt> tokens will be populated with the absolute paths provided by the [squid_certs](#squid_certs), [squid_htpasswd](#squid_htpasswd), and [squid_squidcfg](#squid_squidcfg) fixtures, as appropriate.

## <a name="enumerated_fixtures"></a>Enumerated Fixtures

It is possible to instantiate multiple squid instances using the corresponding enumerated fixtures. All [fixtures](#fixtures) listed above have _*_list_ (e.g. `squid_secure` -> `squid_secure_list`) versions that will return enumerated lists of corresponding data type.

For example:

```python
import requests
from typing import List  # Optional, for typing
from pytest_docker_squid_fixtures import SquidSecure  # Optional, for typing

def test_squid_secure_list(squid_secure_list: List[SquidSecure]):
    for squid_secure in squid_secure_list:
        response = requests.head(
            f"https://{squid_secure.endpoint}/",
            headers=squid_secure.auth_header,
            verify=str(squid_secure.cacerts),
        )
        assert response.status_code == 200
```

It is possible to use both singular and enumerated fixtures within the same test context; however, the same values will be returned for the singular fixture as the first enumerated list value (i.e. squid_secure == squid_secure_list[0]). To avoid complications with lower layers, mainly docker-compose, and to allow for this interchangeability, caching is used internally.

By default, the scale factor of the enumerated instances is set to one (n=1). This value can be changed by overriding the `pdsf_scale_factor` fixture, as follows:

```python
import pytest

@pytest.fixture(scope="session")
def pdsf_scale_factor() -> int:
    return 4
```

This fixture will be used to scale both the insecure and secure docker registries.

## <a name="limitations"></a>Limitations

1. All the fixtures provided by this package are <tt>session</tt> scoped; and will only be executed once per test execution.
2. At most 10 insecure and 10 secure squid instances are supported using the embedded docker compose.

## External Debugging
While all the metadata needed to interact with the proxy is available for consumption via fixtures, sometimes it is desirable to interact with the instantiated service outside of the test context.

If pytest is executed with <tt>--keepalive</tt>, it is possible to connect to the proxy using external tooling both during and after testing has completed:

```bash
$ https_proxy=https://127.0.0.1:$(docker inspect --format='{{ (index (index .NetworkSettings.Ports "3129/tcp") 0).HostPort }}' pytest-squid-secure-0) \
curl --head --proxy-insecure --proxy-user "pytest.username...:pytest.password..." https://www.google.com/
HTTP/1.1 200 Connection established

HTTP/2 200
content-type: text/html; charset=ISO-8859-1
...
```

You can also retrieve additional, transient, configuration files, such as the CA certificate or proxy configuration, from <tt>/tmp/pytest-of-${USER}/pytest-current/...</tt> or by inspecting the running container.

## Development

[Source Control](https://github.com/crashvb/pytest-docker-squid-fixtures)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/crashvb/pytest-docker-squid-fixtures",
    "name": "pytest-docker-squid-fixtures",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "docker fixtures pytest squid",
    "author": "Richard Davis",
    "author_email": "crashvb@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/59/59/6a489bd4a560a4dd20be6ce73d7860a4c6949c22556ba9b5495732e425f8/pytest_docker_squid_fixtures-1.0.0.tar.gz",
    "platform": null,
    "description": "# pytest-docker-squid-fixtures\n\n[![pypi version](https://img.shields.io/pypi/v/pytest-docker-squid-fixtures.svg)](https://pypi.org/project/pytest-docker-squid-fixtures)\n[![build status](https://github.com/crashvb/pytest-docker-squid-fixtures/actions/workflows/main.yml/badge.svg)](https://github.com/crashvb/pytest-docker-squid-fixtures/actions)\n[![coverage status](https://coveralls.io/repos/github/crashvb/pytest-docker-squid-fixtures/badge.svg)](https://coveralls.io/github/crashvb/pytest-docker-squid-fixtures)\n[![python versions](https://img.shields.io/pypi/pyversions/pytest-docker-squid-fixtures.svg?logo=python&logoColor=FBE072)](https://pypi.org/project/pytest-docker-squid-fixtures)\n[![linting](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)\n[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![license](https://img.shields.io/github/license/crashvb/pytest-docker-squid-fixtures.svg)](https://github.com/crashvb/pytest-docker-squid-fixtures/blob/master/LICENSE.md)\n\n## Overview\n\nPytest fixtures to instantiate and utilize local squid docker containers, using [lovely-pytest-docker](https://pypi.org/project/lovely-pytest-docker) and [docker-py](https://pypi.org/project/docker-py), for testing.\n\n## Getting Started\n\nUpdate <tt>setup.py</tt> to include:\n\n```python\nfrom distutils.core import setup\n\nsetup(\n\ttests_require=[\"pytest-docker-squid-fixtures\"]\n)\n```\n\nAll fixtures should be automatically included via the <tt>pytest11</tt> entry point.\n```python\nimport requests\nimport pytest\nfrom pytest_docker_squid_fixtures import SquidInsecure, SquidSecure  # Optional, for typing\n\ndef test_squid_secure(squid_secure: SquidSecure):\n    response = requests.head(f\"https://{squid_secure.endpoint}/\",\n        headers=squid_secure.auth_header,\n        verify=str(squid_secure.cacerts),\n    )\n    assert response.status_code == 200\n\ndef test_squid_insecure(squid_insecure: SquidInsecure):\n    response = requests.head(f\"http://{squid_insecure.endpoint}/\")\n    assert response.status_code == 200\n```\n\nThe `push_image` mark can optionally be added to stage images in the squid prior to testing. See [Markers](#markers) for details.\n\n## Installation\n### From [pypi.org](https://pypi.org/project/pytest-docker-squid-fixtures/)\n\n```\n$ pip install pytest_docker_squid_fixtures\n```\n\n### From source code\n\n```bash\n$ git clone https://github.com/crashvb/pytest-docker-squid-fixtures\n$ cd pytest-docker-squid-fixtures\n$ virtualenv env\n$ source env/bin/activate\n$ python -m pip install --editable .[dev]\n```\n\n## <a name=\"fixtures\"></a>Fixtures\n\n### <a name=\"squid_auth_header\"></a> squid_auth_header\n\nRetrieves an HTTP basic authentication header that is populated with credentials that can access the secure squid service. The credentials are retrieved from the [squid_password](#squid_password) and [squid_username](#squid_username) fixtures. This fixture is used to replicate docker images into the secure squid service.\n\n### <a name=\"squid_cacerts\"></a> squid_cacerts\n\nLocates a user-defined CA trust store (<tt>tests/cacerts</tt>) to use to verify connections to the secure squid service. If one cannot be located, a temporary trust store is created containing certificates from <tt>certifi</tt> and the [squid_certs](#squid_certs) fixture. This fixture is used to instantiate the secure squid service.\n\n### <a name=\"squid_certs\"></a> squid_certs\n\nReturns the paths of the self-signed certificate authority certificate, certificate, and private key that are used by the secure squid service. This fixture is used to instantiate the secure squid service.\n\n#### NamedTuple Fields\n\nThe following fields are defined in the tuple provided by this fixture:\n\n* **ca_certificate** - Path to the self-signed certificate authority certificate.\n* **ca_private_key** - Path to the self-signed certificate authority private key.\n* **certificate** - Path to the certificate.\n* **private_key** - Path to the private key.\n\nTyping is provided by `pytest_docker_squid_fixtures.SquidCerts`.\n\n### <a name=\"squid_hwpasswd\"></a> squid_htpasswd\n\nProvides the path to a htpasswd file that is used by the secure squid service. If a user-defined htpasswd file (<tt>tests/htpasswd</tt>) can be located, it is used. Otherwise, a temporary htpasswd file is created using credentials from the [squid_password](#squid_password) and [squid_username](#squid_username) fixtures. This fixture is used to instantiate the secure squid ervice.\n\n### <a name=\"squid_squidcfg_insecure\"></a> squid_squidcfg_insecure\n\nProvides the path to an insecure squid.cfg file that is used by the insecure squid service. If a user-defined squid.cfg file (<tt>tests/squid.insecure.cfg</tt>) can be located, it is used. Otherwise, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the insecure squid service.\n\n### <a name=\"squid_squidcfg_secure\"></a> squid_squidcfg_secure\n\nProvides the path to a secure squid.cfg file that is used by the secure squid service. If a user-defined squid.cfg file (<tt>tests/squid.secure.cfg</tt>) can be located, it is used. Otherwise, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the secure squid service.\n\n### <a name=\"squid_insecure\"></a> squid_insecure\n\nConfigures and instantiates a squid service without TLS or authentication.\n\n```python\nimport requests\nfrom pytest_docker_squid_fixtures import SquidInsecure  # Optional, for typing\n\ndef test_squid_insecure(squid_insecure: SquidInsecure):\n    response = requests.head(f\"http://{squid_insecure.endpoint}/\")\n    assert response.status_code == 200\n```\n\n#### NamedTuple Fields\n\nThe following fields are defined in the tuple provided by this fixture:\n\n* **docker_compose** - Path to the fully instantiated docker-compose configuration.\n* **endpoint** - Endpoint of the insecure squid service.\n* **endpoint_name** - Endpoint of the insecure squid service, by service name.\n* **service_name** - Name of the service within the docker-compose configuration.\n\nTyping is provided by `pytest_docker_squid_fixtures.SquidInsecure`.\n\n### <a name=\"squid_password\"></a> squid_password\n\nProvides a generated password to use for authentication to the secure squid service. This fixture is used to replicate docker images into the secure squid service.\n\n### <a name=\"squid_secure\"></a> squid_secure\n\nConfigures and instantiates a TLS enabled squid service with HTTP basic authorization.\n\n```python\nimport requests\nfrom pytest_docker_squid_fixtures import SquidSecure  # Optional, for typing\n\ndef test_squid_secure(squid_secure: SquidSecure):\n    response = requests.head(\n        f\"https://{squid_secure.endpoint}/\",\n        headers=squid_secure.auth_header,\n        verify=str(squid_secure.cacerts),\n    )\n    assert response.status_code == 200\n```\n\n#### NamedTuple Fields\n\nThe following fields are defined in the tuple provided by this fixture:\n\n* **auth_header** - from [squid_auth_header](#squid_auth_header).\n* **cacerts** - from [squid_cacerts](#squid_cacerts).\n* **certs** - from [squid_certs](#squid_certs).\n* **docker_compose** - Path to the fully instantiated docker-compose configuration.\n* **endpoint** - Endpoint of the secure squid service.\n* **endpoint_name** - Endpoint of the secure squid service, by service name.\n* **htpasswd** - from [squid_htpasswd](#squid_htpasswd)\n* **password** - from [squid_password](#squid_password).\n* **service_name** - Name of the service within the docker-compose configuration.\n* **ssl_context** - from [squid_ssl_context](#squid_ssl_context).\n* **username** - from [squid_username](#squid_username).\n\nTyping is provided by `pytest_docker_squid_fixtures.SquidSecure`.\n\n### <a name=\"squid_ssl_context\"></a> squid_ssl_context\n\nProvides an SSL context containing the CA trust store from the  [squid_cacerts](#squid_cacerts) fixture. This fixture is used to instantiate the secure squid service.\n\n### <a name=\"squid_username\"></a> squid_username\n\nProvides a generated username to use for authentication to the secure squid service. This fixture is used to replicate docker images into the secure squid service.\n\n### <a name=\"pdsf_docker_compose_insecure\"></a> pdsf_docker_compose_insecure\n\nThis fixture uses the `docker_compose_files` fixture to locate a user-defined docker-compose configuration file (typically <tt>tests/docker-compose.yml</tt>) that contains the <tt>pytest-docker-squid-insecure</tt> service. If one cannot be located, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the insecure squid service. The configuration will be treated as a template; the <tt>$PATH_SQUIDCFG</tt> token will be populated with the absolute path provided by the [squid_squidcfg](#squid_squidcfg) fixture.\n\n### <a name=\"pdsf_docker_compose_secure\"></a> pdsf_docker_compose_secure\n\nThis fixture uses the `docker_compose_files` fixture to locate a user-defined docker-compose configuration file (typically <tt>tests/docker-compose.yml</tt>) that contains the <tt>pytest-docker-squid-secure</tt> service. If one cannot be located, an embedded configuration is copied to a temporary location and returned. This fixture is used to instantiate the secure squid service. The configuration will be treated as a template; the <tt>$PATH_CERTIFICATE</tt>, <tt>$PATH_HTPASSWD</tt>, <tt>$PATH_KEY</tt>, and <tt>$PATH_SQUIDCFG</tt> tokens will be populated with the absolute paths provided by the [squid_certs](#squid_certs), [squid_htpasswd](#squid_htpasswd), and [squid_squidcfg](#squid_squidcfg) fixtures, as appropriate.\n\n## <a name=\"enumerated_fixtures\"></a>Enumerated Fixtures\n\nIt is possible to instantiate multiple squid instances using the corresponding enumerated fixtures. All [fixtures](#fixtures) listed above have _*_list_ (e.g. `squid_secure` -> `squid_secure_list`) versions that will return enumerated lists of corresponding data type.\n\nFor example:\n\n```python\nimport requests\nfrom typing import List  # Optional, for typing\nfrom pytest_docker_squid_fixtures import SquidSecure  # Optional, for typing\n\ndef test_squid_secure_list(squid_secure_list: List[SquidSecure]):\n    for squid_secure in squid_secure_list:\n        response = requests.head(\n            f\"https://{squid_secure.endpoint}/\",\n            headers=squid_secure.auth_header,\n            verify=str(squid_secure.cacerts),\n        )\n        assert response.status_code == 200\n```\n\nIt is possible to use both singular and enumerated fixtures within the same test context; however, the same values will be returned for the singular fixture as the first enumerated list value (i.e. squid_secure == squid_secure_list[0]). To avoid complications with lower layers, mainly docker-compose, and to allow for this interchangeability, caching is used internally.\n\nBy default, the scale factor of the enumerated instances is set to one (n=1). This value can be changed by overriding the `pdsf_scale_factor` fixture, as follows:\n\n```python\nimport pytest\n\n@pytest.fixture(scope=\"session\")\ndef pdsf_scale_factor() -> int:\n    return 4\n```\n\nThis fixture will be used to scale both the insecure and secure docker registries.\n\n## <a name=\"limitations\"></a>Limitations\n\n1. All the fixtures provided by this package are <tt>session</tt> scoped; and will only be executed once per test execution.\n2. At most 10 insecure and 10 secure squid instances are supported using the embedded docker compose.\n\n## External Debugging\nWhile all the metadata needed to interact with the proxy is available for consumption via fixtures, sometimes it is desirable to interact with the instantiated service outside of the test context.\n\nIf pytest is executed with <tt>--keepalive</tt>, it is possible to connect to the proxy using external tooling both during and after testing has completed:\n\n```bash\n$ https_proxy=https://127.0.0.1:$(docker inspect --format='{{ (index (index .NetworkSettings.Ports \"3129/tcp\") 0).HostPort }}' pytest-squid-secure-0) \\\ncurl --head --proxy-insecure --proxy-user \"pytest.username...:pytest.password...\" https://www.google.com/\nHTTP/1.1 200 Connection established\n\nHTTP/2 200\ncontent-type: text/html; charset=ISO-8859-1\n...\n```\n\nYou can also retrieve additional, transient, configuration files, such as the CA certificate or proxy configuration, from <tt>/tmp/pytest-of-${USER}/pytest-current/...</tt> or by inspecting the running container.\n\n## Development\n\n[Source Control](https://github.com/crashvb/pytest-docker-squid-fixtures)\n\n\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Pytest fixtures for testing with squid.",
    "version": "1.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/crashvb/pytest-docker-squid-fixtures/issues",
        "Homepage": "https://github.com/crashvb/pytest-docker-squid-fixtures",
        "Source": "https://github.com/crashvb/pytest-docker-squid-fixtures"
    },
    "split_keywords": [
        "docker",
        "fixtures",
        "pytest",
        "squid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37cb82a61e06a6c36eeaef0b2be0021c8ff3a54b5ea9588b6cda9301008e2e43",
                "md5": "2741f405feb99d1b9ef4620fd8a65362",
                "sha256": "1efac61848ed4afa9f673942072cafdc1084f7a930f71a6fa1855829cbf55fd3"
            },
            "downloads": -1,
            "filename": "pytest_docker_squid_fixtures-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2741f405feb99d1b9ef4620fd8a65362",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23224,
            "upload_time": "2024-08-12T23:51:14",
            "upload_time_iso_8601": "2024-08-12T23:51:14.894297Z",
            "url": "https://files.pythonhosted.org/packages/37/cb/82a61e06a6c36eeaef0b2be0021c8ff3a54b5ea9588b6cda9301008e2e43/pytest_docker_squid_fixtures-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59596a489bd4a560a4dd20be6ce73d7860a4c6949c22556ba9b5495732e425f8",
                "md5": "a54117b7c04b11681d4ab922d43219ee",
                "sha256": "b5b84c2b59bfd36592280bd3640d6c5d5656f2f865c5ba79b7339761510f2d8e"
            },
            "downloads": -1,
            "filename": "pytest_docker_squid_fixtures-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a54117b7c04b11681d4ab922d43219ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22338,
            "upload_time": "2024-08-12T23:51:16",
            "upload_time_iso_8601": "2024-08-12T23:51:16.243732Z",
            "url": "https://files.pythonhosted.org/packages/59/59/6a489bd4a560a4dd20be6ce73d7860a4c6949c22556ba9b5495732e425f8/pytest_docker_squid_fixtures-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-12 23:51:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "crashvb",
    "github_project": "pytest-docker-squid-fixtures",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytest-docker-squid-fixtures"
}
        
Elapsed time: 4.89184s