'L{twisted.mail.smtp.sendmail} creates the ESMTP factory with the ESMTP
arguments.'

def test_honorsESMTPArguments(self):

    reactor = MemoryReactor()
    smtp.sendmail('localhost', 'source@address', 'recipient@address', 'message', reactor=reactor, username='foo', password='bar', requireTransportSecurity=True, requireAuthentication=True)
    factory = reactor.tcpClients[0][2]
    self.assertEqual(factory._requireTransportSecurity, True)
    self.assertEqual(factory._requireAuthentication, True)
    self.assertEqual(factory.username, 'foo')
    self.assertEqual(factory.password, 'bar')
