@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_abort_copy_blob_with_synchronous_copy_fails(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    source_blob_name = (await self._create_block_blob())
    source_blob = self.bsc.get_blob_client(self.container_name, source_blob_name)
    target_blob_name = 'targetblob'
    target_blob = self.bsc.get_blob_client(self.container_name, target_blob_name)
    copy_resp = (await target_blob.start_copy_from_url(source_blob.url))
    with self.assertRaises(HttpResponseError):
        (await target_blob.abort_copy(copy_resp))
    self.assertEqual(copy_resp['copy_status'], 'success')
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_abort_copy_blob_with_synchronous_copy_fails(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    source_blob_name = (await self._create_block_blob())
    source_blob = self.bsc.get_blob_client(self.container_name, source_blob_name)
    target_blob_name = 'targetblob'
    target_blob = self.bsc.get_blob_client(self.container_name, target_blob_name)
    copy_resp = (await target_blob.start_copy_from_url(source_blob.url))
    with self.assertRaises(HttpResponseError):
        (await target_blob.abort_copy(copy_resp))
    self.assertEqual(copy_resp['copy_status'], 'success')