117
117
def connect(self, host='localhost', port=0):
118
118
connect_calls.append((self, host, port))
121
123
old_sendmail = smtplib.SMTP.sendmail
122
124
smtplib.SMTP.sendmail = sendmail
123
125
old_connect = smtplib.SMTP.connect
124
126
smtplib.SMTP.connect = connect
128
132
result = self.run_bzr(*args, **kwargs)
130
134
smtplib.SMTP.sendmail = old_sendmail
131
135
smtplib.SMTP.connect = old_connect
133
138
return result + (connect_calls, sendmail_calls)
135
140
def test_mail_default(self):