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")
url_list = mitmdump_proxy.get_urls()
print(url_list)
content_list = mitmdump_proxy.get_contents()
print(content_list)
assert "baidu" in "".join(url_list)
if __name__ == "__main__":
pytest.main(["-vs"])
Release files for pytest-mitmproxy 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_mitmproxy-1.0.8.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_mitmproxy-1.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / pytest_mitmproxy-1.0.8.tar.gz
| Download URL | pytest_mitmproxy-1.0.8.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ecd3f763fce4dd275cd8f468d95cb763190dd29d0383bfa206e154b0c91c287
|
|
BLAKE2b-256 checksum How to use checksums |
6a68f52886165bd375d323633596a6ee1e09f5a5003d923e961a60992f14c0fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.8
|
Release files / pytest_mitmproxy-1.0.8-py3-none-any.whl
| Download URL | pytest_mitmproxy-1.0.8-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d07272913fff67c982830f532b126d6d0c38efbe38f646e3ba2d2c7a6abd252b
|
|
BLAKE2b-256 checksum How to use checksums |
a2118245b1550e3f95accd5b8ca8b946000f024358edbd6fe30a3c7d3c5c0a67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.8
|