@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_transport_closed_only_once(self, resource_group, location, storage_account, storage_account_key):
    container_name = self.get_resource_name('utcontainerasync')
    transport = AioHttpTransport()
    bsc = BlobServiceClient(self.account_url(storage_account.name, 'blob'), credential=storage_account_key, transport=transport)
    blob_name = self._get_blob_reference()
    async with bsc:
        (await bsc.get_service_properties())
        assert (transport.session is not None)
        async with bsc.get_blob_client(container_name, blob_name) as bc:
            assert (transport.session is not None)
        (await bsc.get_service_properties())
        assert (transport.session is not None)
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_transport_closed_only_once(self, resource_group, location, storage_account, storage_account_key):
    container_name = self.get_resource_name('utcontainerasync')
    transport = AioHttpTransport()
    bsc = BlobServiceClient(self.account_url(storage_account.name, 'blob'), credential=storage_account_key, transport=transport)
    blob_name = self._get_blob_reference()
    async with bsc:
        (await bsc.get_service_properties())
        assert (transport.session is not None)
        async with bsc.get_blob_client(container_name, blob_name) as bc:
            assert (transport.session is not None)
        (await bsc.get_service_properties())
        assert (transport.session is not None)