def login(self, username, password):
        if self.flag == 5:
            raise SMTPAuthenticationError('SMTP Authentication Failure')
        return (username, password)
Mock login method
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/smtp_test.py/MockSMTPSSL.login