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
def test_copydir_noaccess(self): bucket = Bucket('test') with self.assertRaises(OSError): bucket.copydir('/root')