repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/lifecyclemanagement.py
diagrams/openstack/lifecyclemanagement.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OpenStack class _Lifecyclemanagement(_OpenStack): _type = "lifecyclemanagement" _icon_dir = "resources/openstack/lifecyclemanagement" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/adjacentenablers.py
diagrams/openstack/adjacentenablers.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OpenStack class _Adjacentenablers(_OpenStack): _type = "adjacentenablers" _icon_dir = "resources/openstack/adjacentenablers" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/nfv.py
diagrams/openstack/nfv.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OpenStack class _NFV(_OpenStack): _type = "nfv" _icon_dir = "resources/openstack/nfv" class Tacker(_NFV): _icon = "tacker.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/__init__.py
diagrams/openstack/__init__.py
""" Openstack provides a set of general OpenStack services. """ from diagrams import Node class _OpenStack(Node): _provider = "openstack" _icon_dir = "resources/openstack" fontcolor = "#ffffff" class OpenStack(_OpenStack): _icon = "openstack.png"
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/deployment.py
diagrams/openstack/deployment.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OpenStack class _Deployment(_OpenStack): _type = "deployment" _icon_dir = "resources/openstack/deployment" class Ansible(_Deployment): _icon = "ansible.png" class Charms(_Deployment): _icon = "charms.png" class ...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/frontend.py
diagrams/openstack/frontend.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OpenStack class _Frontend(_OpenStack): _type = "frontend" _icon_dir = "resources/openstack/frontend" class Horizon(_Frontend): _icon = "horizon.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/openstack/billing.py
diagrams/openstack/billing.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _OpenStack class _Billing(_OpenStack): _type = "billing" _icon_dir = "resources/openstack/billing" class Cloudkitty(_Billing): _icon = "cloudkitty.png" # Aliases CloudKitty = Cloudkitty
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/format.py
diagrams/gis/format.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Format(_GIS): _type = "format" _icon_dir = "resources/gis/format" class Geopackage(_Format): _icon = "geopackage.png" class Geoparquet(_Format): _icon = "geoparquet.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/cli.py
diagrams/gis/cli.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Cli(_GIS): _type = "cli" _icon_dir = "resources/gis/cli" class Gdal(_Cli): _icon = "gdal.png" class Imposm(_Cli): _icon = "imposm.png" class Lastools(_Cli): _icon = "lastools.png" class Mapnik(_...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/javascript.py
diagrams/gis/javascript.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Javascript(_GIS): _type = "javascript" _icon_dir = "resources/gis/javascript" class Cesium(_Javascript): _icon = "cesium.png" class Geostyler(_Javascript): _icon = "geostyler.png" class Keplerjs(_Java...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/organization.py
diagrams/gis/organization.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Organization(_GIS): _type = "organization" _icon_dir = "resources/gis/organization" class Osgeo(_Organization): _icon = "osgeo.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/java.py
diagrams/gis/java.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Java(_GIS): _type = "java" _icon_dir = "resources/gis/java" class Geotools(_Java): _icon = "geotools.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/python.py
diagrams/gis/python.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Python(_GIS): _type = "python" _icon_dir = "resources/gis/python" class Geopandas(_Python): _icon = "geopandas.png" class Pysal(_Python): _icon = "pysal.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/toolkit.py
diagrams/gis/toolkit.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Toolkit(_GIS): _type = "toolkit" _icon_dir = "resources/gis/toolkit" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/mobile.py
diagrams/gis/mobile.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Mobile(_GIS): _type = "mobile" _icon_dir = "resources/gis/mobile" class Mergin(_Mobile): _icon = "mergin.png" class Qfield(_Mobile): _icon = "qfield.png" class Smash(_Mobile): _icon = "smash.png" ...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/database.py
diagrams/gis/database.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Database(_GIS): _type = "database" _icon_dir = "resources/gis/database" class Postgis(_Database): _icon = "postgis.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/__init__.py
diagrams/gis/__init__.py
""" GIS provides a set of services for Geographic Information Systems provider. """ from diagrams import Node class _GIS(Node): _provider = "gis" _icon_dir = "resources/gis" fontcolor = "#2d3436"
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/desktop.py
diagrams/gis/desktop.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Desktop(_GIS): _type = "desktop" _icon_dir = "resources/gis/desktop" class Maptunik(_Desktop): _icon = "maptunik.png" class QGIS(_Desktop): _icon = "qgis.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/geocoding.py
diagrams/gis/geocoding.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Geocoding(_GIS): _type = "geocoding" _icon_dir = "resources/gis/geocoding" class Addok(_Geocoding): _icon = "addok.png" class Gisgraphy(_Geocoding): _icon = "gisgraphy.png" class Nominatim(_Geocoding)...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/georchestra.py
diagrams/gis/georchestra.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Georchestra(_GIS): _type = "georchestra" _icon_dir = "resources/gis/georchestra" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/server.py
diagrams/gis/server.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Server(_GIS): _type = "server" _icon_dir = "resources/gis/server" class Actinia(_Server): _icon = "actinia.png" class Baremaps(_Server): _icon = "baremaps.png" class Deegree(_Server): _icon = "dee...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/routing.py
diagrams/gis/routing.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Routing(_GIS): _type = "routing" _icon_dir = "resources/gis/routing" class Graphhopper(_Routing): _icon = "graphhopper.png" class Osrm(_Routing): _icon = "osrm.png" class Pgrouting(_Routing): _ico...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/data.py
diagrams/gis/data.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Data(_GIS): _type = "data" _icon_dir = "resources/gis/data" class BAN(_Data): _icon = "ban.png" class Here(_Data): _icon = "here.png" class IGN(_Data): _icon = "ign.png" class Openstreetmap(_Dat...
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/ogc.py
diagrams/gis/ogc.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _OGC(_GIS): _type = "ogc" _icon_dir = "resources/gis/ogc" class OGC(_OGC): _icon = "ogc.png" class WFS(_OGC): _icon = "wfs.png" class WMS(_OGC): _icon = "wms.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mingrammer/diagrams
https://github.com/mingrammer/diagrams/blob/072474aa2a7d24cd074b2e1a61d0b714c3daa945/diagrams/gis/cplusplus.py
diagrams/gis/cplusplus.py
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GIS class _Cplusplus(_GIS): _type = "cplusplus" _icon_dir = "resources/gis/cplusplus" class Mapnik(_Cplusplus): _icon = "mapnik.png" # Aliases
python
MIT
072474aa2a7d24cd074b2e1a61d0b714c3daa945
2026-01-04T14:39:58.534150Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/release/selftest.py
release/selftest.py
""" This addons is used for binaries to perform a minimal selftest. Use like so: mitmdump -s selftest.py -p 0 """ import asyncio import logging import ssl import sys from pathlib import Path from mitmproxy import ctx from mitmproxy.utils import asyncio_utils def load(_): # force a random port ctx.options...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/release/build.py
release/build.py
#!/usr/bin/env python3 from __future__ import annotations import hashlib import os import platform import re import shutil import subprocess import tarfile import urllib.request import warnings import zipfile from datetime import datetime from pathlib import Path import click import cryptography.fernet here = Path(_...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/release/deploy.py
release/deploy.py
#!/usr/bin/env python3 import os import subprocess from pathlib import Path # Security: No third-party dependencies here! root = Path(__file__).absolute().parent.parent if __name__ == "__main__": ref = os.environ["GITHUB_REF"] branch: str | None = None tag: str | None = None if ref.startswith("refs/h...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/release/deploy-microsoft-store.py
release/deploy-microsoft-store.py
#!/usr/bin/env python3 """ This script submits a single MSIX installer to the Microsoft Store. The client_secret will expire after 24 months and needs to be recreated (see docstring below). References: - https://docs.microsoft.com/en-us/windows/uwp/monetize/manage-app-submissions - https://docs.microsoft.com/...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/release/release.py
release/release.py
#!/usr/bin/env -S python3 -u import datetime import http.client import json import os import re import subprocess import sys import time from pathlib import Path # Security: No third-party dependencies here! root = Path(__file__).absolute().parent.parent def get(url: str) -> http.client.HTTPResponse: assert url...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/filename_matching.py
test/filename_matching.py
#!/usr/bin/env python3 import glob import os import re import sys def check_src_files_have_test(): missing_test_files = [] excluded = [ "mitmproxy/contrib/", "mitmproxy/io/proto/", "mitmproxy/proxy/layers/http", "mitmproxy/test/", "mitmproxy/tools/", "mitmproxy...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/conftest.py
test/conftest.py
from __future__ import annotations import asyncio import os import platform import socket import pytest from mitmproxy.utils import data skip_windows = pytest.mark.skipif(os.name == "nt", reason="Skipping due to Windows") skip_not_windows = pytest.mark.skipif( os.name != "nt", reason="Skipping due to not Windo...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/individual_coverage.py
test/individual_coverage.py
#!/usr/bin/env python3 import ast import asyncio import fnmatch import os import re import subprocess import sys import tomllib from pathlib import Path root = Path(__file__).parent.parent.absolute() async def main(): with open("pyproject.toml", "rb") as f: data = tomllib.load(f) exclude = re.compil...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/__init__.py
test/__init__.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/bench/benchmark.py
test/bench/benchmark.py
import asyncio import cProfile import logging from mitmproxy import ctx class Benchmark: """ A simple profiler addon. """ def __init__(self): self.pr = cProfile.Profile() self.started = False self.resps = 0 self.reqs = 0 def request(self, f): self.reqs +...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/examples/__init__.py
test/examples/__init__.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/examples/test_examples.py
test/examples/test_examples.py
from mitmproxy import contentviews from mitmproxy.http import Headers from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy.test import tutils class TestScripts: def test_add_header(self, tdata): with taddons.context() as tctx: a = tctx.script(tdata.path("../exampl...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_addonmanager.py
test/mitmproxy/test_addonmanager.py
import pytest from mitmproxy import addonmanager from mitmproxy import addons from mitmproxy import command from mitmproxy import exceptions from mitmproxy import hooks from mitmproxy import master from mitmproxy import options from mitmproxy.addonmanager import Loader from mitmproxy.proxy.layers.http import HttpReque...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_dns.py
test/mitmproxy/test_dns.py
import ipaddress import struct import pytest from mitmproxy import dns from mitmproxy import flowfilter from mitmproxy.dns import DNSMessage from mitmproxy.test import tflow from mitmproxy.test import tutils class TestResourceRecord: def test_str(self): assert ( str(dns.ResourceRecord.A("tes...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_hooks.py
test/mitmproxy/test_hooks.py
from dataclasses import dataclass import pytest from mitmproxy import hooks def test_hook(): with pytest.raises(TypeError, match="may not be instantiated directly"): hooks.Hook() class NoDataClass(hooks.Hook): pass with pytest.raises(TypeError, match="not a dataclass"): NoDataC...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_udp.py
test/mitmproxy/test_udp.py
import pytest from mitmproxy import flowfilter from mitmproxy import udp from mitmproxy.test import tflow class TestUDPFlow: def test_copy(self): f = tflow.tudpflow() f.get_state() f2 = f.copy() a = f.get_state() b = f2.get_state() del a["id"] del b["id"] ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_ctx.py
test/mitmproxy/test_ctx.py
# TODO: write tests
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_eventsequence.py
test/mitmproxy/test_eventsequence.py
import pytest from mitmproxy import eventsequence from mitmproxy.proxy import layers from mitmproxy.test import tflow @pytest.mark.parametrize( "resp, err", [ (False, False), (True, False), (False, True), (True, True), ], ) def test_http_flow(resp, err): f = tflow.tflo...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_http.py
test/mitmproxy/test_http.py
import asyncio import email import json import time from typing import Any from unittest import mock import pytest from mitmproxy import flow from mitmproxy import flowfilter from mitmproxy.http import Headers from mitmproxy.http import HTTPFlow from mitmproxy.http import Message from mitmproxy.http import Request fr...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
true
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_flow.py
test/mitmproxy/test_flow.py
import io import pytest import mitmproxy.io from mitmproxy import flow from mitmproxy import flowfilter from mitmproxy import options from mitmproxy.exceptions import FlowReadException from mitmproxy.io import tnetstring from mitmproxy.proxy import layers from mitmproxy.proxy import server_hooks from mitmproxy.test i...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_types.py
test/mitmproxy/test_types.py
import contextlib import os from collections.abc import Sequence import pytest from . import test_command import mitmproxy.exceptions import mitmproxy.types from mitmproxy import command from mitmproxy import flow from mitmproxy.test import taddons from mitmproxy.test import tflow @contextlib.contextmanager def chd...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_options.py
test/mitmproxy/test_options.py
from mitmproxy import options def test_simple(): assert options.Options()
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_connection.py
test/mitmproxy/test_connection.py
import pytest from mitmproxy.connection import Client from mitmproxy.connection import ConnectionState from mitmproxy.connection import Server from mitmproxy.test.tflow import tclient_conn from mitmproxy.test.tflow import tserver_conn class TestConnection: def test_basic(self): c = Client( pe...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_proxy.py
test/mitmproxy/test_proxy.py
import argparse import pytest from mitmproxy import options from mitmproxy.tools import cmdline from mitmproxy.tools import main class MockParser(argparse.ArgumentParser): """ argparse.ArgumentParser sys.exits() by default. Make it more testable by throwing an exception instead. """ def error(s...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_optmanager.py
test/mitmproxy/test_optmanager.py
import argparse import copy import io from collections.abc import Sequence from pathlib import Path from typing import Optional import pytest from mitmproxy import exceptions from mitmproxy import options from mitmproxy import optmanager class TO(optmanager.OptManager): def __init__(self): super().__ini...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_typemanager.py
test/mitmproxy/test_typemanager.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_taddons.py
test/mitmproxy/test_taddons.py
from mitmproxy.test import taddons def test_load_script(tdata): with taddons.context() as tctx: s = tctx.script(tdata.path("mitmproxy/data/addonscripts/recorder/recorder.py")) assert s
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_command_lexer.py
test/mitmproxy/test_command_lexer.py
import pyparsing import pytest from hypothesis import example from hypothesis import given from hypothesis.strategies import text from mitmproxy import command_lexer @pytest.mark.parametrize( "test_input,valid", [ ("'foo'", True), ('"foo"', True), ("'foo' bar'", False), ("'foo...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_log.py
test/mitmproxy/test_log.py
from mitmproxy import log def test_logentry(): e = log.LogEntry("foo", "info") assert repr(e) == "LogEntry(foo, info)" f = log.LogEntry("foo", "warning") assert e == e assert e != f assert e != 42 def test_dont_pick_up_mutations(): x = {"foo": "bar"} e = log.LogEntry(x, "info") ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_certs.py
test/mitmproxy/test_certs.py
import ipaddress import os from datetime import datetime from datetime import timezone from pathlib import Path import pytest from cryptography import x509 from cryptography.x509 import NameOID from ..conftest import skip_windows from mitmproxy import certs # class TestDNTree: # def test_simple(self): # ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_command.py
test/mitmproxy/test_command.py
import inspect import io from collections.abc import Sequence import pytest import mitmproxy.types from mitmproxy import command from mitmproxy import exceptions from mitmproxy import flow from mitmproxy.flow import Flow from mitmproxy.test import taddons from mitmproxy.test import tflow class TAddon: @command....
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_version.py
test/mitmproxy/test_version.py
import pathlib import runpy import subprocess import sys from unittest import mock from mitmproxy import version def test_version(capsys): here = pathlib.Path(__file__).absolute().parent version_file = here / ".." / ".." / "mitmproxy" / "version.py" runpy.run_path(str(version_file), run_name="__main__") ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_tcp.py
test/mitmproxy/test_tcp.py
import pytest from mitmproxy import flowfilter from mitmproxy import tcp from mitmproxy.test import tflow class TestTCPFlow: def test_copy(self): f = tflow.ttcpflow() f.get_state() f2 = f.copy() a = f.get_state() b = f2.get_state() del a["id"] del b["id"] ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/__init__.py
test/mitmproxy/__init__.py
# Silence third-party modules import logging logging.getLogger("hyper").setLevel(logging.WARNING) logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("passlib").setLevel(logging.WARNING) logging.getLogger("tornado").setLevel(logging.WARNING)
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_flowfilter.py
test/mitmproxy/test_flowfilter.py
import io from unittest.mock import patch import pytest from mitmproxy import flowfilter from mitmproxy import http from mitmproxy.test import tflow class TestParsing: def _dump(self, x): c = io.StringIO() x.dump(fp=c) assert c.getvalue() def test_parse_err(self): with pytes...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_websocket.py
test/mitmproxy/test_websocket.py
import pytest from wsproto.frame_protocol import Opcode from mitmproxy import http from mitmproxy import websocket from mitmproxy.test import tflow class TestWebSocketData: def test_repr(self): assert repr(tflow.twebsocketflow().websocket) == "<WebSocketData (3 messages)>" def test_state(self): ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_exceptions.py
test/mitmproxy/test_exceptions.py
# TODO: write tests
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_master.py
test/mitmproxy/test_master.py
import asyncio import gc from mitmproxy.master import Master async def err(): raise RuntimeError async def test_exception_handler(caplog_async): caplog_async.set_level("ERROR") # start proxy master and let it initialize its exception handler master = Master(None) running = asyncio.create_task(...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/test_tls.py
test/mitmproxy/test_tls.py
from mitmproxy import tls CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex( "03015658a756ab2c2bff55f636814deac086b7ca56b65058c7893ffc6074f5245f70205658a75475103a152637" "78e1bb6d22e8bbd5b6b0a3a59760ad354e91ba20d353001a0035002f000a000500040009000300060008006000" "61006200640100" ) FULL_CLIENT_HELLO_NO_EXTENSIONS ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/test_cmdline.py
test/mitmproxy/tools/test_cmdline.py
import argparse from mitmproxy import options from mitmproxy.tools import cmdline from mitmproxy.tools import main def test_common(): parser = argparse.ArgumentParser() opts = options.Options() cmdline.common_options(parser, opts) args = parser.parse_args(args=[]) main.process_options(parser, opt...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/test_main.py
test/mitmproxy/tools/test_main.py
from mitmproxy.tools import main shutdown_script = "mitmproxy/data/addonscripts/shutdown.py" def test_mitmweb(tdata): main.mitmweb( [ "--no-web-open-browser", "-s", tdata.path(shutdown_script), "-q", "-p", "0", "--web-por...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/test_dump.py
test/mitmproxy/tools/test_dump.py
import pytest from mitmproxy import options from mitmproxy.tools import dump class TestDumpMaster: @pytest.mark.parametrize("termlog", [False, True]) async def test_addons_termlog(self, capsys, termlog): o = options.Options() m = dump.DumpMaster(o, with_termlog=termlog) assert (m.addo...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/__init__.py
test/mitmproxy/tools/__init__.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_keymap.py
test/mitmproxy/tools/console/test_keymap.py
from unittest import mock import pytest from mitmproxy.test import taddons from mitmproxy.tools.console import keymap def test_binding(): b = keymap.Binding("space", "cmd", ["options"], "") assert b.keyspec() == " " def test_bind(): with taddons.context() as tctx: km = keymap.Keymap(tctx.maste...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_flowview.py
test/mitmproxy/tools/console/test_flowview.py
import sys from unittest import mock from mitmproxy import http from mitmproxy.test import tflow from mitmproxy.tools.console.flowview import FlowDetails async def test_flowview(console): for f in tflow.tflows(): console.commands.call("view.clear") await console.load_flow(f) console.type(...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_contentview.py
test/mitmproxy/tools/console/test_contentview.py
from mitmproxy import contentviews from mitmproxy.contentviews import Metadata from mitmproxy.contentviews import raw from mitmproxy.test import tflow class ConsoleTestContentView(contentviews.Contentview): def __init__(self, content: str): self.content = content def prettify(self, data: bytes, metad...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_common.py
test/mitmproxy/tools/console/test_common.py
import urwid from mitmproxy.test import tflow from mitmproxy.tools.console import common from mitmproxy.tools.console.common import format_duration def test_format_flow(): for f in tflow.tflows(): for render_mode in common.RenderMode: assert common.format_flow(f, render_mode=render_mode) ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_statusbar.py
test/mitmproxy/tools/console/test_statusbar.py
import pytest from mitmproxy.tools.console import statusbar async def test_statusbar(console, monkeypatch): console.options.update( modify_headers=[":~q:foo:bar"], modify_body=[":~q:foo:bar"], ignore_hosts=["example.com", "example.org"], tcp_hosts=["example.tcp"], intercep...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_palettes.py
test/mitmproxy/tools/console/test_palettes.py
import mitmproxy_rs from mitmproxy.tools.console import palettes class TestPalette: def test_helptext(self): for i in palettes.palettes.values(): assert i.palette(False) for i in palettes.palettes.values(): assert i.palette(True) def test_has_tags(self): missin...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/conftest.py
test/mitmproxy/tools/console/conftest.py
import re import sys import pytest from mitmproxy import options from mitmproxy.tools.console import signals from mitmproxy.tools.console import window from mitmproxy.tools.console.master import ConsoleMaster from mitmproxy.utils.signals import _SignalMixin def tokenize(input: str) -> list[str]: keys = [] f...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_commander.py
test/mitmproxy/tools/console/test_commander.py
import pytest from mitmproxy import options from mitmproxy.addons import command_history from mitmproxy.test import taddons from mitmproxy.tools.console.commander import commander @pytest.fixture(autouse=True) def commander_tctx(tmpdir): # This runs before each test dir_name = tmpdir.mkdir("mitmproxy").dirna...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/__init__.py
test/mitmproxy/tools/console/__init__.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_defaultkeys.py
test/mitmproxy/tools/console/test_defaultkeys.py
import mitmproxy.types from mitmproxy.test.tflow import tflow async def test_commands_exist(console): await console.load_flow(tflow()) for binding in console.keymap.bindings: try: parsed, _ = console.commands.parse_partial(binding.command.strip()) cmd = parsed[0].value ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_quickhelp.py
test/mitmproxy/tools/console/test_quickhelp.py
import pytest from mitmproxy.test.tflow import tflow from mitmproxy.tools.console import defaultkeys from mitmproxy.tools.console import quickhelp from mitmproxy.tools.console.eventlog import EventLog from mitmproxy.tools.console.flowlist import FlowListBox from mitmproxy.tools.console.flowview import FlowView from mi...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_master.py
test/mitmproxy/tools/console/test_master.py
from unittest.mock import Mock def test_spawn_editor(monkeypatch, console): text_data = "text" binary_data = b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09" console.get_editor = Mock() console.get_editor.return_value = "editor" console.get_hex_editor = Mock() console.get_hex_editor.return_value =...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/console/test_integration.py
test/mitmproxy/tools/console/test_integration.py
def test_integration(tdata, console): console.type( f":view.flows.load {tdata.path('mitmproxy/data/dumpfile-7.mitm')}<enter>" ) console.type("<enter><tab><tab>") console.type("<space><tab><tab>") # view second flow assert "http://example.com/" in console.screen_contents() def test_options...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/web/test_app.py
test/mitmproxy/tools/web/test_app.py
import gzip import importlib import json import logging from pathlib import Path from unittest import mock import pytest import tornado.testing from tornado import httpclient from tornado import websocket from tornado.web import create_signed_value import mitmproxy_rs from mitmproxy import log from mitmproxy import o...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/web/test_webaddons.py
test/mitmproxy/tools/web/test_webaddons.py
import pytest from mitmproxy.exceptions import OptionsError from mitmproxy.test import taddons from mitmproxy.tools.web import webaddons class TestWebAuth: def test_token_auth(self): a = webaddons.WebAuth() with taddons.context(webaddons.WebAddon(), a) as tctx: assert not a.is_valid_p...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/web/test_static_viewer.py
test/mitmproxy/tools/web/test_static_viewer.py
import json from unittest import mock from mitmproxy import flowfilter from mitmproxy.addons import readfile from mitmproxy.addons import save from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy.tools.web import static_viewer from mitmproxy.tools.web.app import flow_to_json def test_sa...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/web/__init__.py
test/mitmproxy/tools/web/__init__.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/web/test_web_columns.py
test/mitmproxy/tools/web/test_web_columns.py
from mitmproxy.tools.web.web_columns import AVAILABLE_WEB_COLUMNS def test_web_columns(): assert isinstance(AVAILABLE_WEB_COLUMNS, list)
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/tools/web/test_master.py
test/mitmproxy/tools/web/test_master.py
import asyncio import pytest from mitmproxy.options import Options from mitmproxy.tools.web.master import WebMaster async def test_reuse(): async def handler(r, w): pass server = await asyncio.start_server( handler, host="127.0.0.1", port=0, reuse_address=False ) port = server.socke...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_mode_specs.py
test/mitmproxy/proxy/test_mode_specs.py
import dataclasses import pytest from mitmproxy.proxy.mode_specs import ProxyMode from mitmproxy.proxy.mode_specs import Socks5Mode def test_parse(): m = ProxyMode.parse("reverse:https://example.com/@127.0.0.1:443") m = ProxyMode.from_state(m.get_state()) assert m.type_name == "reverse" assert m.fu...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_mode_servers.py
test/mitmproxy/proxy/test_mode_servers.py
import asyncio import platform import socket from unittest.mock import AsyncMock from unittest.mock import MagicMock from unittest.mock import Mock import pytest from ...conftest import no_ipv6 from ...conftest import skip_not_linux import mitmproxy.platform import mitmproxy_rs from mitmproxy.addons.proxyserver impor...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_tutils.py
test/mitmproxy/proxy/test_tutils.py
from collections.abc import Iterable from dataclasses import dataclass from typing import Any import pytest from . import tutils from mitmproxy.proxy import commands from mitmproxy.proxy import events from mitmproxy.proxy import layer class TEvent(events.Event): commands: Iterable[Any] def __init__(self, c...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_utils.py
test/mitmproxy/proxy/test_utils.py
import pytest from mitmproxy.proxy.utils import expect from mitmproxy.proxy.utils import ReceiveBuffer def test_expect(): class Foo: @expect(str, int) def foo(self, x): return "".join(reversed(x)) @expect(str) def bar(self, x): yield "".join(reversed(x)) ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_server.py
test/mitmproxy/proxy/test_server.py
import asyncio import collections import textwrap from dataclasses import dataclass from typing import Callable from unittest import mock import pytest from mitmproxy import options from mitmproxy.connection import Server from mitmproxy.proxy import commands from mitmproxy.proxy import layer from mitmproxy.proxy impo...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/tutils.py
test/mitmproxy/proxy/tutils.py
import collections.abc import difflib import itertools import logging import re import textwrap import traceback from collections.abc import Callable from collections.abc import Iterable from typing import Any from typing import AnyStr from typing import Generic from typing import TypeVar from typing import Union from...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_context.py
test/mitmproxy/proxy/test_context.py
from mitmproxy.proxy import context from mitmproxy.test import taddons from mitmproxy.test import tflow def test_context(): with taddons.context() as tctx: c = context.Context(tflow.tclient_conn(), tctx.options) assert repr(c) c.layers.append(1) assert repr(c) c2 = c.fork()...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/conftest.py
test/mitmproxy/proxy/conftest.py
import os import pytest from hypothesis import settings from mitmproxy import connection from mitmproxy import options from mitmproxy.addons.proxyserver import Proxyserver from mitmproxy.proxy import context @pytest.fixture def tctx() -> context.Context: opts = options.Options() Proxyserver().load(opts) ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_tunnel.py
test/mitmproxy/proxy/test_tunnel.py
import pytest from mitmproxy.connection import ConnectionState from mitmproxy.connection import Server from mitmproxy.proxy import layer from mitmproxy.proxy import tunnel from mitmproxy.proxy.commands import CloseConnection from mitmproxy.proxy.commands import CloseTcpConnection from mitmproxy.proxy.commands import L...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/bench.py
test/mitmproxy/proxy/bench.py
""" Usage: - pip install pytest-benchmark - pytest bench.py See also: - https://github.com/mitmproxy/proxybench """ import copy from .layers import test_tcp from .layers import test_tls from .layers.http import test_http from .layers.http import test_http2 def test_bench_http_roundtrip(tctx, benchmark): ...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/__init__.py
test/mitmproxy/proxy/__init__.py
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_server_hooks.py
test/mitmproxy/proxy/test_server_hooks.py
from mitmproxy.proxy import server_hooks def test_noop(): assert server_hooks
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false
mitmproxy/mitmproxy
https://github.com/mitmproxy/mitmproxy/blob/e6aa924bb411a9687b91920b8d094af37bc02b90/test/mitmproxy/proxy/test_layer.py
test/mitmproxy/proxy/test_layer.py
from logging import DEBUG import pytest from mitmproxy.proxy import commands from mitmproxy.proxy import events from mitmproxy.proxy import layer from mitmproxy.proxy.context import Context from test.mitmproxy.proxy import tutils class TestLayer: def test_continue(self, tctx: Context): class TLayer(laye...
python
MIT
e6aa924bb411a9687b91920b8d094af37bc02b90
2026-01-04T14:40:00.086164Z
false