Code Duplication    Length = 8-8 lines in 2 locations

test_qiniu.py 2 locations

@@ 252-259 (lines=8) @@
249
        ret,info = self.bucket.rename(bucket_name, 'copyfrom', 'copyfrom', force='true')
250
        print(info)
251
        assert info.status_code == 200
252
        ops = build_batch_rename(bucket_name, {'copyfrom':'copyfrom'}, force='true')
253
        ret, info = self.bucket.batch(ops)
254
        print(info)
255
        assert ret[0]['code'] == 200
256
257
    def test_batch_stat(self):
258
        ops = build_batch_stat(bucket_name, ['python-sdk.html'])
259
        ret, info = self.bucket.batch(ops)
260
        print(info)
261
        assert ret[0]['code'] == 200
262
@@ 231-238 (lines=8) @@
228
        ret,info = self.bucket.copy(bucket_name, 'copyfrom', bucket_name, 'copyfrom', force='true')
229
        print(info)
230
        assert info.status_code == 200
231
        ops = build_batch_move(bucket_name, {'copyfrom':'copyfrom'}, bucket_name,force='true')
232
        ret, info = self.bucket.batch(ops)
233
        print(info)
234
        assert ret[0]['code'] == 200
235
236
    def test_batch_rename(self):
237
        key = 'rename'+rand_string(8)
238
        self.bucket.copy(bucket_name, 'copyfrom', bucket_name, key)
239
        key2 = key + 'rename'
240
        ops = build_batch_move(bucket_name, {key: key2}, bucket_name)
241
        ret, info = self.bucket.batch(ops)