Skip to main content

pytest plugin for mitmproxy tests

Project description

pytest_mitmproxy

install

pip install pytest-mitmproxy

install cert

mitm-install

usage

import pytest
import requests


def test_baidu(mitmdump_proxy):
    mitmdump_proxy.url_filter = "baidu"

    requests.get("http://www.baidu.com")

    urls = mitmdump_proxy.get_urls()
    assert "baidu" in "".join(urls)


if __name__ == "__main__":
    pytest.main(["-vs"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_mitmproxy-1.0.7.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

pytest_mitmproxy-1.0.7-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pytest_mitmproxy-1.0.7.tar.gz.

File metadata

  • Download URL: pytest_mitmproxy-1.0.7.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for pytest_mitmproxy-1.0.7.tar.gz
Algorithm Hash digest
SHA256 2a33648ab6a5f375b9744ca20f17b048885c2577bccb542534dbe7054458546a
MD5 624c04f60217179ec23e6a98cfab320d
BLAKE2b-256 60778853c8ffc9fbdc4b4a2cf20349a26471454a7142fbc65d6712d3212aaec9

See more details on using hashes here.

File details

Details for the file pytest_mitmproxy-1.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_mitmproxy-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2083c707276efa0a2bff2beda7aa4246c1e46e98f2888eeb1a0ac003b1be52c4
MD5 12e40d58dbfe4e1f0e926c2415df1c4a
BLAKE2b-256 dc416b3128283a4212e04394dbc63493f7094f73ce2530eb4ec9402575cf2d4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page