'Verify that when L{smtp.ESMTPClient} connects to a server over a
transport providing L{ISSLTransport}, C{requireTransportSecurity} is
C{True}, and it is presented with the given capabilities, it will try
to send its mail and not first attempt to negotiate TLS using the
I{STARTTLS} protocol action.
@param capabilities: Bytes to include in the test server\'s capability
response.  These must be formatted exactly as required by the
protocol, including a line which ends the capability response.
@type param: L{bytes}
@raise: C{self.failureException} if the behavior of
C{self.clientProtocol} is not as described.'

def _requireTransportSecurityOverSSLTest(self, capabilities):

    transport = StringTransport()
    directlyProvides(transport, interfaces.ISSLTransport)
    self.clientProtocol.makeConnection(transport)
    self.clientProtocol.dataReceived(self.SERVER_GREETING)
    transport.clear()
    self.clientProtocol.dataReceived((self.EHLO_RESPONSE + capabilities))
    self.assertEqual('MAIL    FROM:<test@example.org>\r\n', transport.value())
