'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.'

def test_loginAgainstWeirdServer(self):

    realm = DummyRealm()
    p = cred.portal.Portal(realm)
    p.registerChecker(DummyChecker())
    server = DummyESMTP({'LOGIN': smtp.LOGINCredentials})
    server.portal = p
    client = MyESMTPClient('testpassword')
    cAuth = smtp.LOGINAuthenticator('testuser')
    client.registerAuthenticator(cAuth)
    d = self.loopback(server, client)
    d.addCallback((lambda x: self.assertTrue(server.authenticated)))
    return d
