Exemple #1
0
 def test_file_transfer_handler(self):
     fth = FileTransferHandler()
     fth.init_attributes()
     assert fth.get_open_env()
     caps = typedict()
     fth.parse_file_transfer_caps(caps)
     assert fth.get_info()
     fth.cleanup()
 def test_file_transfer_handler(self):
     fth = FileTransferHandler()
     fth.init_attributes()
     assert fth.get_open_env()
     caps = typedict()
     fth.parse_file_transfer_caps(caps)
     assert fth.get_info()
     fth.check_digest("foo", "000", "000", "xor")
     try:
         fth.check_digest("foo", "000", "001", "sha1")
     except Exception:
         pass
     else:
         raise Exception("digest mismatch should trigger an exception!")
     fth.cleanup()
Exemple #3
0
 def parse_client_caps(self, c):
     FileTransferHandler.parse_file_transfer_caps(self, c)
Exemple #4
0
 def parse_client_caps(self, c : dict):
     FileTransferHandler.parse_file_transfer_caps(self, c)
     self.machine_id = c.strget("machine_id")