@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_account_sas(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    blob_name = (await self._create_block_blob())
    token = generate_account_sas(self.bsc.account_name, self.bsc.credential.account_key, ResourceTypes(container=True, object=True), AccountSasPermissions(read=True), (datetime.utcnow() + timedelta(hours=1)))
    blob = BlobClient(self.bsc.url, container_name=self.container_name, blob_name=blob_name, credential=token)
    container = ContainerClient(self.bsc.url, container_name=self.container_name, credential=token)
    (await container.get_container_properties())
    blob_response = requests.get(blob.url)
    container_response = requests.get(container.url, params={'restype': 'container'})
    self.assertTrue(blob_response.ok)
    self.assertEqual(self.byte_data, blob_response.content)
    self.assertTrue(container_response.ok)
@pytest.mark.live_test_only
@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_account_sas(self, resource_group, location, storage_account, storage_account_key):
    (await self._setup(storage_account.name, storage_account_key))
    blob_name = (await self._create_block_blob())
    token = generate_account_sas(self.bsc.account_name, self.bsc.credential.account_key, ResourceTypes(container=True, object=True), AccountSasPermissions(read=True), (datetime.utcnow() + timedelta(hours=1)))
    blob = BlobClient(self.bsc.url, container_name=self.container_name, blob_name=blob_name, credential=token)
    container = ContainerClient(self.bsc.url, container_name=self.container_name, credential=token)
    (await container.get_container_properties())
    blob_response = requests.get(blob.url)
    container_response = requests.get(container.url, params={'restype': 'container'})
    self.assertTrue(blob_response.ok)
    self.assertEqual(self.byte_data, blob_response.content)
    self.assertTrue(container_response.ok)