def isOnServer(self): """Check the event associated with this instance exists on the server. Args: None Returns: True if valid, False if not Raises: NetworkError """ myInpFileName, myOutFileName = self.fileNames() myList = [myInpFileName, myOutFileName] myFtpClient = FtpClient() return myFtpClient.hasFiles(myList)
def isOnServer(self): """Check the event associated with this instance exists on the server. Args: None Returns: True if valid, False if not Raises: NetworkError """ myInpFileName, myOutFileName = self.fileNames() myList = [myInpFileName, myOutFileName] myFtpClient = FtpClient() return myFtpClient.hasFiles(myList)
def testHasFiles(self): """Test that the ftp client can check if a list of file exists""" myClient = FtpClient() myFiles = ['20120726022003.inp.zip', '20120726022003.out.zip'] myMessage = ('Expected that %s exist on the server' % myFiles) self.assertTrue(myClient.hasFiles(myFiles), myMessage)