summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_smtplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-03-21 02:12:14 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-03-21 02:12:14 (GMT)
commit54bd49d49b7624177f709f195a773be7607dbe4c (patch)
treef8c613910494628c0d58c6c9fe91f508d7cebfa7 /Lib/test/test_smtplib.py
parenta686ed7d10076319007e50978f68079886a7fd4a (diff)
parent03b0116c781f8b2b530c2452d25d9a372c8f3635 (diff)
downloadcpython-54bd49d49b7624177f709f195a773be7607dbe4c.zip
cpython-54bd49d49b7624177f709f195a773be7607dbe4c.tar.gz
cpython-54bd49d49b7624177f709f195a773be7607dbe4c.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.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index 35bd22e..f538a9f 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -668,12 +668,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:
@@ -853,7 +853,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)