~ubuntu-branches/ubuntu/wily/foolscap/wily-proposed

« back to all changes in this revision

Viewing changes to foolscap/test/test_reconnector.py

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2011-10-30 18:37:14 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111030183714-yqg9ifkg40259ny7
Tags: 0.6.2-1
* New upstream release
  - drop upstream applied fix-testsuite-openssl1.0.0.patch
* do not compress xhtml files

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
from twisted.trial import unittest
4
4
from foolscap.api import UnauthenticatedTub, eventually, flushEventualQueue
5
5
from foolscap.test.common import HelperTarget
6
 
from twisted.internet.main import CONNECTION_LOST
7
6
from twisted.internet import defer, reactor, error
8
 
from twisted.python.failure import Failure
9
7
from foolscap import negotiate
10
8
 
11
9
class AlwaysFailNegotiation(negotiate.Negotiation):
49
47
        rref.notifyOnDisconnect(self._disconnected, self.count)
50
48
        if self.count < 2:
51
49
            # forcibly disconnect it
52
 
            eventually(rref.tracker.broker.transport.loseConnection,
53
 
                       Failure(CONNECTION_LOST))
 
50
            eventually(rref.tracker.broker.transport.loseConnection)
54
51
        else:
55
52
            self.done.callback("done")
56
53