Files
mytoolkit/tests/test_git_proxy.py
T
Zhengshou Lai f8be17fe4f git proxy: add start/stop/restart daemon lifecycle for FastGitHub.
Background daemons with port/PID tracking and Parallels socat, keep FastGithub logs off the TTY, and document install in the skill.
2026-08-12 21:12:14 +08:00

14 lines
454 B
Python

"""Unit tests for git proxy helpers."""
from mytoolkit.commands.git import _proxy_loopback_port
def test_proxy_loopback_port_http():
assert _proxy_loopback_port("http://127.0.0.1:38457") == 38457
assert _proxy_loopback_port("http://localhost:10080") == 10080
def test_proxy_loopback_port_rejects_remote():
assert _proxy_loopback_port("http://10.211.55.2:38457") is None
assert _proxy_loopback_port("socks5://127.0.0.1:1080") is None