@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_retain_plan(self, resource_group):
    webapp_name = self.create_random_name('web', 24)
    plan = self.create_random_name('web-plan', 24)
    self.cmd('appservice plan create -g {} -n {}'.format(resource_group, plan))
    self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan))
    self.cmd('webapp delete -g {} -n {} --keep-dns-registration --keep-empty-plan --keep-metrics'.format(resource_group, webapp_name))
    self.cmd('appservice plan list -g {}'.format(resource_group), checks=[JMESPathCheck('[0].name', plan)])
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_retain_plan(self, resource_group):
    webapp_name = self.create_random_name('web', 24)
    plan = self.create_random_name('web-plan', 24)
    self.cmd('appservice plan create -g {} -n {}'.format(resource_group, plan))
    self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan))
    self.cmd('webapp delete -g {} -n {} --keep-dns-registration --keep-empty-plan --keep-metrics'.format(resource_group, webapp_name))
    self.cmd('appservice plan list -g {}'.format(resource_group), checks=[JMESPathCheck('[0].name', plan)])