def testGetFile(self): """Test that the ftp client can fetch a file ok""" myClient = FtpClient() myListing = myClient.getListing() # Make it a single string myListing = "\n".join(myListing) myMessage = "Expected outcome:\n%s\nActual outcome:\n%s" % (myListing, self._expectedMatches) for myExpectedFile in self._expectedMatches: assert re.search(myExpectedFile, myListing), myMessage
def testGetDirectoryListing(self): """Check if we can get a nice directory listing""" myClient = FtpClient() myListing = myClient.getListing() # Make it a single string myListing = "\n".join(myListing) myMessage = "Expected this list:\n%s\nTo contain these items:\n%s" % (myListing, self._expectedMatches) for myExpectedFile in self._expectedMatches: assert re.search(myExpectedFile, myListing), myMessage
def testGetFile(self): """Test that the ftp client can fetch a file ok""" myClient = FtpClient() myListing = myClient.getListing() #Make it a single string myListing = '\n'.join(myListing) myMessage = ( 'Expected outcome:\n%s\nActual outcome:\n%s' % (myListing, self._expectedMatches)) for myExpectedFile in self._expectedMatches: assert re.search(myExpectedFile, myListing), myMessage
def testGetDirectoryListing(self): """Check if we can get a nice directory listing""" myClient = FtpClient() myListing = myClient.getListing() #Make it a single string myListing = '\n'.join(myListing) myMessage = ( 'Expected this list:\n%s\nTo contain these items:\n%s' % (myListing, self._expectedMatches)) for myExpectedFile in self._expectedMatches: assert re.search(myExpectedFile, myListing), myMessage