@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_windows_runtime_version(self, resource_group, storage_account):
    functionapp_name = self.create_random_name('functionappwindowsruntime', 40)
    self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type Windows --runtime node --runtime-version 8'.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 appsettings list -g {} -n {}'.format(resource_group, functionapp_name), checks=[JMESPathCheck("[?name=='FUNCTIONS_WORKER_RUNTIME'].value|[0]", 'node'), JMESPathCheck("[?name=='WEBSITE_NODE_DEFAULT_VERSION'].value|[0]", '~8')])
    self.cmd('functionapp delete -g {} -n {}'.format(resource_group, functionapp_name))
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_windows_runtime_version(self, resource_group, storage_account):
    functionapp_name = self.create_random_name('functionappwindowsruntime', 40)
    self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type Windows --runtime node --runtime-version 8'.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 appsettings list -g {} -n {}'.format(resource_group, functionapp_name), checks=[JMESPathCheck("[?name=='FUNCTIONS_WORKER_RUNTIME'].value|[0]", 'node'), JMESPathCheck("[?name=='WEBSITE_NODE_DEFAULT_VERSION'].value|[0]", '~8')])
    self.cmd('functionapp delete -g {} -n {}'.format(resource_group, functionapp_name))