コード例 #1
0
ファイル: test_ftp_client.py プロジェクト: vdeparday/inasafe
 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
コード例 #2
0
ファイル: test_ftp_client.py プロジェクト: vdeparday/inasafe
 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
コード例 #3
0
ファイル: test_ftp_client.py プロジェクト: vdeparday/inasafe
 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
コード例 #4
0
ファイル: test_ftp_client.py プロジェクト: vdeparday/inasafe
 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