@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_local_context(self, resource_group, storage_account):
    from knack.util import CLIError
    self.kwargs.update({'plan_name': self.create_random_name(prefix='functionapp-plan-', length=24), 'functionapp_name': self.create_random_name(prefix='functionapp-', length=24), 'storage_account': storage_account})
    self.cmd('functionapp plan create -g {rg} -n {plan_name} --sku B2')
    self.cmd('functionapp plan show')
    with self.assertRaises(CLIError):
        self.cmd('functionapp plan delete')
    self.cmd('functionapp create -n {functionapp_name} --storage-account {storage_account}')
    self.cmd('functionapp show')
    with self.assertRaises(CLIError):
        self.cmd('functionapp delete')
    self.cmd('functionapp delete -n {functionapp_name}')
    self.cmd('functionapp plan delete -n {plan_name} -y')
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_local_context(self, resource_group, storage_account):
    from knack.util import CLIError
    self.kwargs.update({'plan_name': self.create_random_name(prefix='functionapp-plan-', length=24), 'functionapp_name': self.create_random_name(prefix='functionapp-', length=24), 'storage_account': storage_account})
    self.cmd('functionapp plan create -g {rg} -n {plan_name} --sku B2')
    self.cmd('functionapp plan show')
    with self.assertRaises(CLIError):
        self.cmd('functionapp plan delete')
    self.cmd('functionapp create -n {functionapp_name} --storage-account {storage_account}')
    self.cmd('functionapp show')
    with self.assertRaises(CLIError):
        self.cmd('functionapp delete')
    self.cmd('functionapp delete -n {functionapp_name}')
    self.cmd('functionapp plan delete -n {plan_name} -y')