@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_auto_delete_plan(self, resource_group):
    webapp_name = self.create_random_name('web-del-test', 24)
    plan = self.create_random_name('web-del-plan', 24)
    self.cmd('appservice plan create -g {} -n {} -l {}'.format(resource_group, plan, WINDOWS_ASP_LOCATION_WEBAPP))
    self.cmd('appservice plan update -g {} -n {} --sku S1'.format(resource_group, plan), checks=[JMESPathCheck('name', plan), JMESPathCheck('sku.tier', 'Standard'), JMESPathCheck('sku.name', 'S1')])
    self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan))
    self.cmd('webapp delete -g {} -n {}'.format(resource_group, webapp_name))
    self.cmd('appservice plan list -g {}'.format(resource_group), checks=[JMESPathCheck('length(@)', 0)])
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_auto_delete_plan(self, resource_group):
    webapp_name = self.create_random_name('web-del-test', 24)
    plan = self.create_random_name('web-del-plan', 24)
    self.cmd('appservice plan create -g {} -n {} -l {}'.format(resource_group, plan, WINDOWS_ASP_LOCATION_WEBAPP))
    self.cmd('appservice plan update -g {} -n {} --sku S1'.format(resource_group, plan), checks=[JMESPathCheck('name', plan), JMESPathCheck('sku.tier', 'Standard'), JMESPathCheck('sku.name', 'S1')])
    self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan))
    self.cmd('webapp delete -g {} -n {}'.format(resource_group, webapp_name))
    self.cmd('appservice plan list -g {}'.format(resource_group), checks=[JMESPathCheck('length(@)', 0)])