@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_copy_blob_with_existing_blob(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    blob_name = (await self._create_block_blob())
    blob = self.bsc.get_blob_client(self.container_name, blob_name)
    sourceblob = '{0}/{1}/{2}'.format(self.account_url(storage_account.name, 'blob'), self.container_name, blob_name)
    copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy')
    copy = (await copyblob.start_copy_from_url(sourceblob))
    self.assertIsNotNone(copy)
    self.assertEqual(copy['copy_status'], 'success')
    self.assertFalse(isinstance(copy['copy_status'], Enum))
    self.assertIsNotNone(copy['copy_id'])
    copy_content = (await (await copyblob.download_blob()).readall())
    self.assertEqual(copy_content, self.byte_data)
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_copy_blob_with_existing_blob(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    blob_name = (await self._create_block_blob())
    blob = self.bsc.get_blob_client(self.container_name, blob_name)
    sourceblob = '{0}/{1}/{2}'.format(self.account_url(storage_account.name, 'blob'), self.container_name, blob_name)
    copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy')
    copy = (await copyblob.start_copy_from_url(sourceblob))
    self.assertIsNotNone(copy)
    self.assertEqual(copy['copy_status'], 'success')
    self.assertFalse(isinstance(copy['copy_status'], Enum))
    self.assertIsNotNone(copy['copy_id'])
    copy_content = (await (await copyblob.download_blob()).readall())
    self.assertEqual(copy_content, self.byte_data)