@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_webapp_local_context(self, resource_group):
    from knack.util import CLIError
    self.kwargs.update({'plan_name': self.create_random_name(prefix='webapp-plan-', length=24), 'webapp_name': self.create_random_name(prefix='webapp-', length=24)})
    self.cmd('appservice plan create -g {rg} -n {plan_name}')
    self.cmd('appservice plan show')
    with self.assertRaises(CLIError):
        self.cmd('appservice plan delete')
    self.cmd('webapp create -n {webapp_name}')
    self.cmd('webapp show')
    with self.assertRaises(CLIError):
        self.cmd('webapp delete')
    self.cmd('webapp delete -n {webapp_name}')
    self.cmd('appservice plan delete -n {plan_name} -y')
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_webapp_local_context(self, resource_group):
    from knack.util import CLIError
    self.kwargs.update({'plan_name': self.create_random_name(prefix='webapp-plan-', length=24), 'webapp_name': self.create_random_name(prefix='webapp-', length=24)})
    self.cmd('appservice plan create -g {rg} -n {plan_name}')
    self.cmd('appservice plan show')
    with self.assertRaises(CLIError):
        self.cmd('appservice plan delete')
    self.cmd('webapp create -n {webapp_name}')
    self.cmd('webapp show')
    with self.assertRaises(CLIError):
        self.cmd('webapp delete')
    self.cmd('webapp delete -n {webapp_name}')
    self.cmd('appservice plan delete -n {plan_name} -y')