@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_with_no_default_app_insights(self, resource_group, storage_account):
    functionapp_name = self.create_random_name('functionappwithappinsights', 40)
    self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type Windows --disable-app-insights'.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'))])
    app_set = self.cmd('functionapp config appsettings list -g {} -n {}'.format(resource_group, functionapp_name)).get_output_in_json()
    self.assertTrue(('APPINSIGHTS_INSTRUMENTATIONKEY' not in [kp['name'] for kp in app_set]))
    self.assertTrue(('AzureWebJobsDashboard' in [kp['name'] for kp in app_set]))
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
@StorageAccountPreparer()
def test_functionapp_with_no_default_app_insights(self, resource_group, storage_account):
    functionapp_name = self.create_random_name('functionappwithappinsights', 40)
    self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type Windows --disable-app-insights'.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'))])
    app_set = self.cmd('functionapp config appsettings list -g {} -n {}'.format(resource_group, functionapp_name)).get_output_in_json()
    self.assertTrue(('APPINSIGHTS_INSTRUMENTATIONKEY' not in [kp['name'] for kp in app_set]))
    self.assertTrue(('AzureWebJobsDashboard' in [kp['name'] for kp in app_set]))