def test_timeout_restarts_tor(self, *_): tor = Tor() self.assertIsNone(tor.connect(1234)) tor.stop()
def test_missing_binary_raises_critical_error(self, *_): tor = Tor() with self.assertRaises(SystemExit): tor.connect(1234)
def test_closed_socket_raises_critical_error(self, *_): tor = Tor() self.assertIsNone(tor.connect(1234)) with self.assertRaises(SystemExit): tor.connect(1234)
def test_no_tor_process_is_created_when_tails_is_used(self, *_): tor = Tor() self.assertIsNone(tor.connect(1234)) self.assertIsNone(tor.tor_process)