@@ -36,7 +36,7 @@ def __init__(self, conn):
3636 asynchat .async_chat .__init__ (self , conn )
3737 self .set_terminator (b"\r \n " )
3838 self .in_buffer = []
39- self .push ('+OK dummy pop3 server ready.' )
39+ self .push ('+OK dummy pop3 server ready. <timestamp> ' )
4040
4141 def collect_incoming_data (self , data ):
4242 self .in_buffer .append (data )
@@ -104,6 +104,9 @@ def cmd_noop(self, arg):
104104 def cmd_rpop (self , arg ):
105105 self .push ('+OK done nothing.' )
106106
107+ def cmd_apop (self , arg ):
108+ self .push ('+OK done nothing.' )
109+
107110
108111class DummyPOP3Server (asyncore .dispatcher , threading .Thread ):
109112
@@ -169,7 +172,8 @@ def tearDown(self):
169172 self .server .stop ()
170173
171174 def test_getwelcome (self ):
172- self .assertEqual (self .client .getwelcome (), b'+OK dummy pop3 server ready.' )
175+ self .assertEqual (self .client .getwelcome (),
176+ b'+OK dummy pop3 server ready. <timestamp>' )
173177
174178 def test_exceptions (self ):
175179 self .assertRaises (poplib .error_proto , self .client ._shortcmd , 'echo -err' )
@@ -209,6 +213,9 @@ def test_noop(self):
209213 def test_rpop (self ):
210214 self .assertOK (self .client .rpop ('foo' ))
211215
216+ def test_apop (self ):
217+ self .assertOK (self .client .apop ('foo' , 'dummypassword' ))
218+
212219 def test_top (self ):
213220 expected = (b'+OK 116 bytes' ,
214221 [
b'From: [email protected] ' ,
b'Content-Type: text/plain' ,
@@ -239,7 +246,7 @@ def __init__(self, conn):
239246 self .set_socket (ssl_socket )
240247 self .set_terminator (b"\r \n " )
241248 self .in_buffer = []
242- self .push ('+OK dummy pop3 server ready.' )
249+ self .push ('+OK dummy pop3 server ready. <timestamp> ' )
243250
244251 class TestPOP3_SSLClass (TestPOP3Class ):
245252 # repeat previous tests by using poplib.POP3_SSL
0 commit comments