Esempio n. 1
0
    def test_copydir_with_children(self):
        path = tempfile.mkdtemp()
        _, filename = tempfile.mkstemp(dir=path)

        bucket = Bucket('test')
        with patch('gstorage.bucket.Blob') as mock_blob:
            bucket.copydir(path)
            assert mock_blob.call_count == 1
Esempio n. 2
0
 def test_copydir_noaccess(self):
     bucket = Bucket('test')
     with self.assertRaises(OSError):
         bucket.copydir('/root')