def test_loginAgainstWeirdServer(self):
        """
        When communicating with a server which implements the I{LOGIN} SASL
        mechanism using C{"Username:"} as the challenge (rather than C{"User
        Name\\0"}), L{ESMTPClient} can still authenticate successfully using
        the I{LOGIN} mechanism.
        """
        realm = DummyRealm()
        p = cred.portal.Portal(realm)
        p.registerChecker(DummyChecker())

        server = DummyESMTP({b'LOGIN': smtp.LOGINCredentials})
        server.portal = p

        client = MyESMTPClient(b'testpassword')
        cAuth = smtp.LOGINAuthenticator(b'testuser')
        client.registerAuthenticator(cAuth)

        d = self.loopback(server, client)
        d.addCallback(lambda x: self.assertTrue(server.authenticated))
        return d

        When communicating with a server which implements the I{LOGIN} SASL
        mechanism using C{"Username:"} as the challenge (rather than C{"User
        Name\0"}), L{ESMTPClient} can still authenticate successfully using
        the I{LOGIN} mechanism.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_smtp.py