Exemple #1
0
class HandshakeObserver(object):
    """
    Provides a link from the negotiator to the test case.

    @ivar success: Whether the observers L{handshakeSuccess} has been called.
        If C{True} then the attribute C{data} will be set.
    @ivar buffer: File like object containing any data written by the
        handshake negotiator.
    @ivar remaining_data: When L{success} is C{True}, this will contain any
        left over data from the handshake negotiator.
    """

    implements(handshake.IHandshakeObserver)


    def __init__(self):
        self.buffer = BufferedByteStream()
        self.success = False
        self.data = None


    def write(self, data):
        self.buffer.write(data)


    def handshakeSuccess(self, data):
        self.success = True
        self.data = data
Exemple #2
0
class HandshakeObserver(object):
    """
    Provides a link from the negotiator to the test case.
    """

    failure = None

    def __init__(self, test):
        self.buffer = BufferedByteStream()
        self.test = test

        self.test.succeeded = False

    def write(self, data):
        self.buffer.write(data)

    def handshakeSuccess(self, data):
        self.test.succeeded = True
Exemple #3
0
class HandshakeObserver(object):
    """
    Provides a link from the negotiator to the test case.
    """

    failure = None

    def __init__(self, test):
        self.buffer = BufferedByteStream()
        self.test = test

        self.test.succeeded = False

    def write(self, data):
        self.buffer.write(data)

    def handshakeSuccess(self, data):
        self.test.succeeded = True
Exemple #4
0
    def __init__(self, test):
        self.buffer = BufferedByteStream()
        self.test = test

        self.test.succeeded = False
Exemple #5
0
    def __init__(self, test):
        self.buffer = BufferedByteStream()
        self.test = test

        self.test.succeeded = False
Exemple #6
0
 def __init__(self):
     self.buffer = BufferedByteStream()
     self.success = False
     self.data = None