@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_abort_copy_blob(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    source_blob = 'http://www.gutenberg.org/files/59466/59466-0.txt'
    copied_blob = self.bsc.get_blob_client(self.container_name, '59466-0.txt')
    copy = (await copied_blob.start_copy_from_url(source_blob))
    self.assertEqual(copy['copy_status'], 'pending')
    (await copied_blob.abort_copy(copy))
    props = (await self._wait_for_async_copy(copied_blob))
    self.assertEqual(props.copy.status, 'aborted')
    actual_data = (await copied_blob.download_blob())
    bytes_data = (await (await copied_blob.download_blob()).readall())
    self.assertEqual(bytes_data, b'')
    self.assertEqual(actual_data.properties.copy.status, 'aborted')
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_abort_copy_blob(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    source_blob = 'http://www.gutenberg.org/files/59466/59466-0.txt'
    copied_blob = self.bsc.get_blob_client(self.container_name, '59466-0.txt')
    copy = (await copied_blob.start_copy_from_url(source_blob))
    self.assertEqual(copy['copy_status'], 'pending')
    (await copied_blob.abort_copy(copy))
    props = (await self._wait_for_async_copy(copied_blob))
    self.assertEqual(props.copy.status, 'aborted')
    actual_data = (await copied_blob.download_blob())
    bytes_data = (await (await copied_blob.download_blob()).readall())
    self.assertEqual(bytes_data, b)
    self.assertEqual(actual_data.properties.copy.status, 'aborted')