/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_merge_directive.py

  • Committer: James Henstridge
  • Date: 2007-10-20 00:14:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2925.
  • Revision ID: james@jamesh.id.au-20071020001437-pbujo03uyui6idz4
* Fix merge-directive blackbox test.
* Fix small typo in comment in smtp_connection.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        connect_calls = []
117
117
        def connect(self, host='localhost', port=0):
118
118
            connect_calls.append((self, host, port))
119
 
        def starttls(self):
120
 
            pass
 
119
        def has_extn(self, extension):
 
120
            return False
 
121
        def ehlo(self):
 
122
            return (200, 'Ok')
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
125
 
        old_starttls = smtplib.SMTP.starttls
126
 
        smtplib.SMTP.starttls = starttls
 
127
        old_ehlo = smtplib.SMTP.ehlo
 
128
        smtplib.SMTP.ehlo = ehlo
 
129
        old_has_extn = smtplib.SMTP.has_extn
 
130
        smtplib.SMTP.has_extn = has_extn
127
131
        try:
128
132
            result = self.run_bzr(*args, **kwargs)
129
133
        finally:
130
134
            smtplib.SMTP.sendmail = old_sendmail
131
135
            smtplib.SMTP.connect = old_connect
132
 
            smtplib.SMTP.starttls = old_starttls
 
136
            smtplib.SMTP.ehlo = old_ehlo
 
137
            smtplib.SMTP.has_extn = old_has_extn
133
138
        return result + (connect_calls, sendmail_calls)
134
139
 
135
140
    def test_mail_default(self):