diff options
Diffstat (limited to 'src/mailman/testing/mta.py')
| -rw-r--r-- | src/mailman/testing/mta.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mailman/testing/mta.py b/src/mailman/testing/mta.py index 234540e98..4dd5bc097 100644 --- a/src/mailman/testing/mta.py +++ b/src/mailman/testing/mta.py @@ -59,28 +59,28 @@ class StatisticsChannel(Channel): def smtp_EHLO(self, arg): if not arg: - self.push(b'501 Syntax: HELO hostname') + self.push('501 Syntax: HELO hostname') return if self._SMTPChannel__greeting: - self.push(b'503 Duplicate HELO/EHLO') + self.push('503 Duplicate HELO/EHLO') else: self._SMTPChannel__greeting = arg - self.push(b'250-%s' % self._SMTPChannel__fqdn) - self.push(b'250 AUTH PLAIN') + self.push('250-%s' % self._SMTPChannel__fqdn) + self.push('250 AUTH PLAIN') def smtp_STAT(self, arg): """Cause the server to send statistics to its controller.""" self._server.send_statistics() - self.push(b'250 Ok') + self.push('250 Ok') def smtp_AUTH(self, arg): """Record that the AUTH occurred.""" if arg == 'PLAIN AHRlc3R1c2VyAHRlc3RwYXNz': # testuser:testpass - self.push(b'235 Ok') + self.push('235 Ok') self._server.send_auth(arg) else: - self.push(b'571 Bad authentication') + self.push('571 Bad authentication') def smtp_RCPT(self, arg): """For testing, sometimes cause a non-25x response.""" @@ -91,7 +91,7 @@ class StatisticsChannel(Channel): else: # The test suite wants this to fail. The message corresponds to # the exception we expect smtplib.SMTP to raise. - self.push(b'%d Error: SMTPRecipientsRefused' % code) + self.push('%d Error: SMTPRecipientsRefused' % code) def smtp_MAIL(self, arg): """For testing, sometimes cause a non-25x response.""" @@ -102,7 +102,7 @@ class StatisticsChannel(Channel): else: # The test suite wants this to fail. The message corresponds to # the exception we expect smtplib.SMTP to raise. - self.push(b'%d Error: SMTPResponseException' % code) + self.push('%d Error: SMTPResponseException' % code) @@ -210,7 +210,7 @@ class ConnectionCountingController(QueueController): :rtype: integer """ smtpd = self._connect() - smtpd.docmd(b'STAT') + smtpd.docmd('STAT') # An Empty exception will occur if the data isn't available in 10 # seconds. Let that propagate. return self.oob_queue.get(block=True, timeout=10) @@ -231,4 +231,4 @@ class ConnectionCountingController(QueueController): def reset(self): smtpd = self._connect() - smtpd.docmd(b'RSET') + smtpd.docmd('RSET') |
