@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_webapp_update(self, resource_group):
    webapp_name = self.create_random_name('webapp-update-test', 40)
    plan_name = self.create_random_name('webapp-update-plan', 40)
    self.cmd('appservice plan create -g {} -n {} --sku S1'.format(resource_group, plan_name))
    self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan_name)).assert_with_checks([JMESPathCheck('clientAffinityEnabled', True)])
    self.cmd('webapp update -g {} -n {} --client-affinity-enabled false --set tags.foo=bar'.format(resource_group, webapp_name)).assert_with_checks([JMESPathCheck('name', webapp_name), JMESPathCheck('tags.foo', 'bar'), JMESPathCheck('clientAffinityEnabled', False)])
    self.cmd('webapp deployment slot create -g {} -n {} -s s1'.format(resource_group, webapp_name))
    self.cmd('webapp update -g {} -n {} -s s1 --client-affinity-enabled true'.format(resource_group, webapp_name), checks=[self.check('clientAffinityEnabled', True)])
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
def test_webapp_update(self, resource_group):
    webapp_name = self.create_random_name('webapp-update-test', 40)
    plan_name = self.create_random_name('webapp-update-plan', 40)
    self.cmd('appservice plan create -g {} -n {} --sku S1'.format(resource_group, plan_name))
    self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan_name)).assert_with_checks([JMESPathCheck('clientAffinityEnabled', True)])
    self.cmd('webapp update -g {} -n {} --client-affinity-enabled false --set tags.foo=bar'.format(resource_group, webapp_name)).assert_with_checks([JMESPathCheck('name', webapp_name), JMESPathCheck('tags.foo', 'bar'), JMESPathCheck('clientAffinityEnabled', False)])
    self.cmd('webapp deployment slot create -g {} -n {} -s s1'.format(resource_group, webapp_name))
    self.cmd('webapp update -g {} -n {} -s s1 --client-affinity-enabled true'.format(resource_group, webapp_name), checks=[self.check('clientAffinityEnabled', True)])