@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer()
def test_functionapp_cors(self, resource_group, storage_account):
    self.kwargs.update({'plan': self.create_random_name(prefix='slot-traffic-plan', length=24), 'function': self.create_random_name(prefix='slot-traffic-web', length=24), 'storage': self.create_random_name(prefix='storage', length=24)})
    self.cmd('appservice plan create -g {rg} -n {plan} --sku S1')
    self.cmd('storage account create --name {storage} -g {rg} --sku Standard_LRS')
    self.cmd('functionapp create -g {rg} -n {function} --plan {plan} -s {storage}')
    self.cmd('functionapp cors add -g {rg} -n {function} --allowed-origins https://msdn.com https://msn.com')
    result = self.cmd('functionapp cors show -g {rg} -n {function}').get_output_in_json()['allowedOrigins']
    self.assertTrue(set(['https://msdn.com', 'https://msn.com']).issubset(set(result)))
@ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
@StorageAccountPreparer()
def test_functionapp_cors(self, resource_group, storage_account):
    self.kwargs.update({'plan': self.create_random_name(prefix='slot-traffic-plan', length=24), 'function': self.create_random_name(prefix='slot-traffic-web', length=24), 'storage': self.create_random_name(prefix='storage', length=24)})
    self.cmd('appservice plan create -g {rg} -n {plan} --sku S1')
    self.cmd('storage account create --name {storage} -g {rg} --sku Standard_LRS')
    self.cmd('functionapp create -g {rg} -n {function} --plan {plan} -s {storage}')
    self.cmd('functionapp cors add -g {rg} -n {function} --allowed-origins https://msdn.com https://msn.com')
    result = self.cmd('functionapp cors show -g {rg} -n {function}').get_output_in_json()['allowedOrigins']
    self.assertTrue(set(['https://msdn.com', 'https://msn.com']).issubset(set(result)))