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 get_info(self):
     return {
         "printers": self.printers,
         "file-transfers": FileTransferHandler.get_info(self),
     }