Duplicate of allmydata.test.test_tor_provider.Provider.test_handler_control_endpoint

This commit is contained in:
Jean-Paul Calderone 2020-12-16 11:28:36 -05:00
parent 7eb9f2ce54
commit 468895c74d

View File

@ -141,22 +141,6 @@ class Tor(unittest.TestCase):
str(ctx.exception)
)
def test_controlport(self):
h1 = mock.Mock()
with mock.patch("foolscap.connections.tor.control_endpoint",
return_value=h1) as f:
config = config_from_string(
"fake.port",
"no-basedir",
BASECONFIG + "[tor]\ncontrol.port = tcp:localhost:1234\n",
)
tor_provider = create_tor_provider(reactor, config)
h = tor_provider.get_tor_handler()
self.assertEqual(len(f.mock_calls), 1)
ep = f.mock_calls[0][1][0]
self.assertIsInstance(ep, endpoints.TCP4ClientEndpoint)
self.assertIdentical(h, h1)
class I2P(unittest.TestCase):
def test_samport_and_launch(self):