diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-03-21 02:12:53 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-03-21 02:12:53 (GMT) |
commit | dac94d619c0456609ce762282571f50b132d0996 (patch) | |
tree | f504a8593e4fb188da7b6ac16670c7914a257ce7 /Lib/test/test_smtplib.py | |
parent | ba7d9d46f23be3bdce2bf69a5e18bac1e152bb6f (diff) | |
parent | 54bd49d49b7624177f709f195a773be7607dbe4c (diff) | |
download | cpython-dac94d619c0456609ce762282571f50b132d0996.zip cpython-dac94d619c0456609ce762282571f50b132d0996.tar.gz cpython-dac94d619c0456609ce762282571f50b132d0996.tar.bz2 |
Merge: #5712: Preemptively fix some other possible timing issues.
Diffstat (limited to 'Lib/test/test_smtplib.py')
-rw-r--r-- | Lib/test/test_smtplib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index 87a73d5..ffa7663 100644 --- a/Lib/test/test_smtplib.py +++ b/Lib/test/test_smtplib.py @@ -662,12 +662,12 @@ class SimSMTPChannel(smtpd.SMTPChannel): if self.rcpt_response is None: super().smtp_RCPT(arg) return - self.push(self.rcpt_response[self.rcpt_count]) self.rcpt_count += 1 + self.push(self.rcpt_response[self.rcpt_count-1]) def smtp_RSET(self, arg): - super().smtp_RSET(arg) self.rset_count += 1 + super().smtp_RSET(arg) def smtp_DATA(self, arg): if self.data_response is None: @@ -847,7 +847,7 @@ class SMTPSimTests(unittest.TestCase): with self.assertRaises(smtplib.SMTPSenderRefused): smtp.sendmail('John', 'Sally', 'test message') self.assertIsNone(smtp.sock) - self.assertEqual(self.serv._SMTPchannel.rcpt_count, 0) + self.assertEqual(self.serv._SMTPchannel.rset_count, 0) def test_421_from_rcpt_cmd(self): smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15) |