@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_reserved_instance(self, resource_group, storage_account):
    functionapp_name = self.create_random_name('functionappwithreservedinstance', 40)
    self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type Windows'.format(resource_group, functionapp_name, WINDOWS_ASP_LOCATION_FUNCTIONAPP, storage_account)).assert_with_checks([JMESPathCheck('state', 'Running'), JMESPathCheck('name', functionapp_name), JMESPathCheck('kind', 'functionapp'), JMESPathCheck('hostNames[0]', (functionapp_name + '.azurewebsites.net'))])
    self.cmd('functionapp config set -g {} -n {} --prewarmed-instance-count 4'.format(resource_group, functionapp_name)).assert_with_checks([JMESPathCheck('preWarmedInstanceCount', 4)])
    self.cmd('functionapp delete -g {} -n {}'.format(resource_group, functionapp_name))
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_reserved_instance(self, resource_group, storage_account):
    functionapp_name = self.create_random_name('functionappwithreservedinstance', 40)
    self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type Windows'.format(resource_group, functionapp_name, WINDOWS_ASP_LOCATION_FUNCTIONAPP, storage_account)).assert_with_checks([JMESPathCheck('state', 'Running'), JMESPathCheck('name', functionapp_name), JMESPathCheck('kind', 'functionapp'), JMESPathCheck('hostNames[0]', (functionapp_name + '.azurewebsites.net'))])
    self.cmd('functionapp config set -g {} -n {} --prewarmed-instance-count 4'.format(resource_group, functionapp_name)).assert_with_checks([JMESPathCheck('preWarmedInstanceCount', 4)])
    self.cmd('functionapp delete -g {} -n {}'.format(resource_group, functionapp_name))