Esempio n. 1
0
 def test_pull(self):
     self.create()
     storage.push(self.bucket, "mykey.txt", self.tmp_filename)
     dest_tmp_filename = tempfile.mktemp()
     storage.pull(self.bucket, "mykey.txt", dest_tmp_filename)
     f = open(dest_tmp_filename)
     self.assertEqual(f.readline(), "42")
Esempio n. 2
0
 def test_pull(self):
     self.create()
     storage.push(self.bucket, "mykey.txt", self.tmp_filename)
     dest_tmp_filename = tempfile.mktemp()
     storage.pull(self.bucket, "mykey.txt", dest_tmp_filename)
     f = open(dest_tmp_filename)
     self.assertEqual(f.readline(), "42")
Esempio n. 3
0
 def _download_binary(self):
     logger.info("Downloading binary: {} -> {}".format(
         self.remote_location, self.local_location))
     bucket, path = self.remote_location.replace("s3://", "",
                                                 1).split("/", 1)
     # with FileLock(dest):
     pull(bucket, path, self.local_location)
     os.chmod(self.local_location, 0o755)
Esempio n. 4
0
 def _download_binary(self):
     logger.info("Downloading binary: {} -> {}".format(self.remote_location, self.local_location))
     bucket, path = self.remote_location.replace("s3://", "", 1).split("/", 1)
     # with FileLock(dest):
     pull(bucket, path, self.local_location)
     os.chmod(self.local_location, 0o755)