|
@@ 247-254 (lines=8) @@
|
| 244 |
|
print(info) |
| 245 |
|
assert ret == {} |
| 246 |
|
|
| 247 |
|
def test_batch_rename_force(self): |
| 248 |
|
ret, info = self.bucket.rename(bucket_name, 'copyfrom', 'copyfrom', force='true') |
| 249 |
|
print(info) |
| 250 |
|
assert info.status_code == 200 |
| 251 |
|
ops = build_batch_rename(bucket_name, {'copyfrom': 'copyfrom'}, force='true') |
| 252 |
|
ret, info = self.bucket.batch(ops) |
| 253 |
|
print(info) |
| 254 |
|
assert ret[0]['code'] == 200 |
| 255 |
|
|
| 256 |
|
def test_batch_stat(self): |
| 257 |
|
ops = build_batch_stat(bucket_name, ['python-sdk.html']) |
|
@@ 226-233 (lines=8) @@
|
| 223 |
|
print(info) |
| 224 |
|
assert ret == {} |
| 225 |
|
|
| 226 |
|
def test_batch_move_force(self): |
| 227 |
|
ret, info = self.bucket.copy(bucket_name, 'copyfrom', bucket_name, 'copyfrom', force='true') |
| 228 |
|
print(info) |
| 229 |
|
assert info.status_code == 200 |
| 230 |
|
ops = build_batch_move(bucket_name, {'copyfrom': 'copyfrom'}, bucket_name, force='true') |
| 231 |
|
ret, info = self.bucket.batch(ops) |
| 232 |
|
print(info) |
| 233 |
|
assert ret[0]['code'] == 200 |
| 234 |
|
|
| 235 |
|
def test_batch_rename(self): |
| 236 |
|
key = 'rename' + rand_string(8) |