Files
nutshell/tests/test_tor.py
callebtc 7ed2161dba [Wallet] API: optional amount in InvoiceResponse (#236)
* fix missing value in InvoiceResponse API

* wallet api: optional amount in invoiceresponse

* skip tor test again
2023-05-23 18:30:33 +02:00

23 lines
507 B
Python

import pytest
import requests
from cashu.tor.tor import TorProxy
@pytest.mark.skip(reason="Tor is not installed on CI")
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()