@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_with_metadata(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    blob_name = self._get_blob_reference()
    metadata = {'hello': 'world', 'number': '42'}
    data = b'hello world'
    blob = self.bsc.get_blob_client(self.container_name, blob_name)
    resp = (await blob.upload_blob(data, length=len(data), metadata=metadata))
    self.assertIsNotNone(resp.get('etag'))
    md = (await blob.get_blob_properties()).metadata
    self.assertDictEqual(md, metadata)
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_with_metadata(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    blob_name = self._get_blob_reference()
    metadata = {'hello': 'world', 'number': '42'}
    data = b'hello world'
    blob = self.bsc.get_blob_client(self.container_name, blob_name)
    resp = (await blob.upload_blob(data, length=len(data), metadata=metadata))
    self.assertIsNotNone(resp.get('etag'))
    md = (await blob.get_blob_properties()).metadata
    self.assertDictEqual(md, metadata)