[Telepathy-commits] [telepathy-gabble/master] Rename TlsAuthenticator to BlockForeverTlsAuthenticator

Alban Crequy alban.crequy at collabora.co.uk
Tue Aug 19 10:52:55 PDT 2008


20080603154940-a41c0-9dc625768a6d08a324a7dde8b4afcc3fc3642b91.gz
---
 tests/twisted/gabbletest.py         |    6 ++++--
 tests/twisted/test-connect-twice.py |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py
index efce71a..2708c3f 100644
--- a/tests/twisted/gabbletest.py
+++ b/tests/twisted/gabbletest.py
@@ -86,8 +86,10 @@ class JabberAuthenticator(xmlstream.Authenticator):
         self.xmlstream.send(result)
         self.xmlstream.dispatch(self.xmlstream, xmlstream.STREAM_AUTHD_EVENT)
 
-class TlsAuthenticator(xmlstream.Authenticator):
-    "Tls stream authenticator that blocks after the <proceed/>."
+class BlockForeverTlsAuthenticator(xmlstream.Authenticator):
+    """A TLS stream authenticator that is deliberately broken. It sends
+    <proceed/> to the client but then do nothing, so the TLS handshake will
+    not work. Useful for testing regression of bug #14341."""
 
     def __init__(self, username, password):
         xmlstream.Authenticator.__init__(self)
diff --git a/tests/twisted/test-connect-twice.py b/tests/twisted/test-connect-twice.py
index a513980..446edbd 100644
--- a/tests/twisted/test-connect-twice.py
+++ b/tests/twisted/test-connect-twice.py
@@ -12,7 +12,7 @@ import servicetest
 import twisted
 
 from gabbletest import make_connection, make_stream, JabberAuthenticator, \
-                       XmppAuthenticator, TlsAuthenticator, \
+                       XmppAuthenticator, BlockForeverTlsAuthenticator, \
                        XmppXmlStream, JabberXmlStream
 
 def test(q, bus, conn1, conn2, stream1, stream2):
@@ -54,7 +54,7 @@ if __name__ == '__main__':
         'port': dbus.UInt32(4242),
         }
     conn1 = make_connection(bus, queue.append, params)
-    authenticator = TlsAuthenticator('test1', 'pass')
+    authenticator = BlockForeverTlsAuthenticator('test1', 'pass')
     stream1 = make_stream(queue.append, authenticator, protocol=XmppXmlStream,
                           port=4242)
 
-- 
1.5.6.3




More information about the Telepathy-commits mailing list