@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_with_generator_async(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))

    def gen():
        (yield 'hello')
        (yield 'world!')
        (yield ' eom')
    blob = self.bsc.get_blob_client(self.container_name, 'gen_blob')
    resp = (await blob.upload_blob(data=gen()))
    self.assertIsNotNone(resp.get('etag'))
    content = (await (await blob.download_blob()).readall())
    self.assertEqual(content, b'helloworld! eom')
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_with_generator_async(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))

    def gen():
        (yield 'hello')
        (yield 'world!')
        (yield ' eom')
    blob = self.bsc.get_blob_client(self.container_name, 'gen_blob')
    resp = (await blob.upload_blob(data=gen()))
    self.assertIsNotNone(resp.get('etag'))
    content = (await (await blob.download_blob()).readall())
    self.assertEqual(content, b'helloworld! eom')