Exemplo n.º 1
0
    def test_tor_launch_success_then_shutdown(self):
        """
        There was an error where we double-callbacked a deferred,
        i.e. success and then shutdown. This repeats it.
        """
        process = TorProcessProtocol(None)
        process.status_client('STATUS_CLIENT BOOTSTRAP PROGRESS=100 TAG=foo SUMMARY=cabbage')
        self.assertEqual(None, process.connected_cb)

        class Value(object):
            exitCode = 123

        class Status(object):
            value = Value()
        process.processEnded(Status())
        self.assertEquals(len(self.flushLoggedErrors(RuntimeError)), 1)
Exemplo n.º 2
0
    def test_status_updates(self):
        from txtorcon.torconfig import TorProcessProtocol

        proto = TorProcessProtocol(None)
        proto.status_client("NOTICE CONSENSUS_ARRIVED")
Exemplo n.º 3
0
    def test_status_updates(self):
        from txtorcon.torconfig import TorProcessProtocol

        proto = TorProcessProtocol(None)
        proto.status_client("NOTICE CONSENSUS_ARRIVED")
Exemplo n.º 4
0
 def test_status_updates(self):
     process = TorProcessProtocol(None)
     process.status_client("NOTICE CONSENSUS_ARRIVED")