コード例 #1
0
 def test_timeout_restarts_tor(self, *_):
     tor = Tor()
     self.assertIsNone(tor.connect(1234))
     tor.stop()
コード例 #2
0
 def test_missing_binary_raises_critical_error(self, *_):
     tor = Tor()
     with self.assertRaises(SystemExit):
         tor.connect(1234)
コード例 #3
0
 def test_closed_socket_raises_critical_error(self, *_):
     tor = Tor()
     self.assertIsNone(tor.connect(1234))
     with self.assertRaises(SystemExit):
         tor.connect(1234)
コード例 #4
0
 def test_no_tor_process_is_created_when_tails_is_used(self, *_):
     tor = Tor()
     self.assertIsNone(tor.connect(1234))
     self.assertIsNone(tor.tor_process)