Ejemplo n.º 1
0
 def test_uploadDownload(self):
     smb = self.create_connection()
     smb.login(self.username, self.password, self.domain)
     f = open(self.upload)
     smb.putFile(self.share, self.file, f.read)
     f.close()
     f = open(self.upload + '2', 'wb+')
     smb.getFile(self.share, self.file, f.write)
     f.close()
     os.unlink(self.upload + '2')
     smb.deleteFile(self.share, self.file)
     smb.logoff()
Ejemplo n.º 2
0
 def test_uploadDownload(self):
     smb = self.create_connection()
     smb.login(self.username, self.password, self.domain)
     f = open(self.upload)
     smb.putFile(self.share, self.file, f.read)
     f.close()
     f = open(self.upload + '2', 'wb+')
     smb.getFile(self.share, self.file, f.write)
     f.close()
     os.unlink(self.upload + '2')
     smb.deleteFile(self.share, self.file)
     smb.logoff()