def test_tlsAfterStartTLS(self): """ The C{TLS} attribute of a L{Connection} instance is C{True} after L{Connection.startTLS} is called. """ skt = FakeSocket("") protocol = FakeProtocol() conn = Connection(skt, protocol, reactor=_FakeFDSetReactor()) conn._tlsClientDefault = True conn.startTLS(ClientContextFactory(), True) self.assertTrue(conn.TLS)