コード例 #1
0
ファイル: shake_data.py プロジェクト: essc/inasafe
    def is_on_server(self):
        """Check the event associated with this instance exists on the server.

        :return: True if valid, False if not

        :raises: NetworkError
        """
        input_file_name, output_file_name = self.file_names()
        file_list = [input_file_name, output_file_name]
        ftp_client = FtpClient()
        return ftp_client.has_files(file_list)
コード例 #2
0
    def is_on_server(self):
        """Check the event associated with this instance exists on the server.

        :return: True if valid, False if not

        :raises: NetworkError
        """
        input_file_name, output_file_name = self.file_names()
        file_list = [input_file_name, output_file_name]
        ftp_client = FtpClient()
        return ftp_client.has_files(file_list)
コード例 #3
0
ファイル: test_ftp_client.py プロジェクト: borysiasty/inasafe
 def test_has_files(self):
     """Test that the ftp client can check if a list of file exists"""
     client = FtpClient()
     input_files = ['20120726022003.inp.zip', '20120726022003.out.zip']
     message = ('Expected that %s exist on the server' % input_files)
     self.assertTrue(client.has_files(input_files), message)
コード例 #4
0
 def test_has_files(self):
     """Test that the ftp client can check if a list of file exists"""
     client = FtpClient()
     input_files = ['20120726022003.inp.zip', '20120726022003.out.zip']
     message = ('Expected that %s exist on the server' % input_files)
     self.assertTrue(client.has_files(input_files), message)