Files
nutshell/tests/test_tor.py
callebtc 53a8387a0d refactor
2023-01-11 02:57:59 +01:00

23 lines
470 B
Python

import pytest
import requests
from cashu.tor.tor import TorProxy
@pytest.mark.skip
def test_tor_setup():
s = requests.Session()
tor = TorProxy(timeout=False)
tor.run_daemon()
socks_host, socks_port = "localhost", 9050
proxies = {
"http": f"socks5://{socks_host}:{socks_port}",
"https": f"socks5://{socks_host}:{socks_port}",
}
s.proxies.update(proxies)
resp = s.get("https://google.com")
resp.raise_for_status()