On 2008/09/23 15:44:26, billiejoex wrote: > > http://codereview.appspot.com/5698/diff/1/2#newcode28 > > Line 28: asyncore.dispatcher.__init__(self) > > ...
16 years, 7 months ago
(2008-09-23 22:56:30 UTC)
#4
On 2008/09/23 15:44:26, billiejoex wrote:
> > http://codereview.appspot.com/5698/diff/1/2#newcode28
> > Line 28: asyncore.dispatcher.__init__(self)
> > "super()" should be used here.
>
> How?
super(DummyFTPServer, self).__init__()
On 2008/09/23 13:18:52, Benjamin wrote: > http://codereview.appspot.com/5698/diff/1/2#newcode16 > Line 16: HOST = test_support.HOST > This ...
16 years, 7 months ago
(2008-09-24 00:01:30 UTC)
#5
On 2008/09/23 13:18:52, Benjamin wrote:
> http://codereview.appspot.com/5698/diff/1/2#newcode16
> Line 16: HOST = test_support.HOST
> This should be from "test.test_support import HOST".
Done.
> http://codereview.appspot.com/5698/diff/1/2#newcode28
> Line 28: asyncore.dispatcher.__init__(self)
> "super()" should be used here.
Done as recommended by Benjamin.
> http://codereview.appspot.com/5698/diff/1/2#newcode33
> Line 33: self.handler = DummyFTPHandler
> This should be a class attribute.
Done.
> http://codereview.appspot.com/5698/diff/1/2#newcode318
> Line 318: # we don't have a reference of the data received on the server
> Couldn't you store the data in DummyFTPHandler and inspect it through
> self.client.handler?
Done.
> Also, it would be nice to see a few tests for bad server responses.
I added two tests for rename() and delete().
All the other ftplib.FTP methods implicitly uses ftplib.FTP.sendcmd/voidcmd
which are already tested against bad server responses in
TestFTPClass.test_exceptions and TestFTPClass.test_voidcmd.
I'm attaching the new patch on the Python bug tracker.
Issue 5698: #3939 ftplib tests
(Closed)
Created 16 years, 7 months ago by Benjamin
Modified 15 years, 9 months ago
Reviewers: billiejoex
Base URL: http://svn.python.org/view/*checkout*/python/trunk/
Comments: 4