diff --git a/src/azure-cli/azure/cli/command_modules/appservice/static_sites.py b/src/azure-cli/azure/cli/command_modules/appservice/static_sites.py index c74e0be2a15..bb00faf55e6 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/static_sites.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/static_sites.py @@ -265,8 +265,8 @@ def _parse_pair(pair, delimiter): if delimiter not in pair: CLIError("invalid format of pair {0}".format(pair)) - pair_split = pair.split(delimiter) - return pair_split[0], pair_split[1] + index = pair.index(delimiter) + return pair[:index], pair[1 + index:] def _raise_missing_token_suggestion(): diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_staticapp_commands_thru_mock.py b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_staticapp_commands_thru_mock.py index f650ae17534..52e252c3937 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_staticapp_commands_thru_mock.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_staticapp_commands_thru_mock.py @@ -296,8 +296,8 @@ def test_list_staticsite_function_app_settings_without_resourcegroup(self): self.rg1, self.name1) def test_set_staticsite_function_app_settings_with_resourcegroup(self): - app_settings1_input = ['key1=val1', 'key2=val2'] - app_settings1_dict = {'key1': 'val1', 'key2': 'val2'} + app_settings1_input = ['key1=val1', 'key2=val2==', 'key3=val3='] + app_settings1_dict = {'key1': 'val1', 'key2': 'val2==', 'key3': 'val3='} set_staticsite_function_app_settings(self.mock_cmd, self.name1, app_settings1_input, self.rg1) @@ -305,8 +305,8 @@ def test_set_staticsite_function_app_settings_with_resourcegroup(self): self.rg1, self.name1, kind=None, properties=app_settings1_dict) def test_set_staticsite_function_app_settings_without_resourcegroup(self): - app_settings1_input = ['key1=val1', 'key2=val2'] - app_settings1_dict = {'key1': 'val1', 'key2': 'val2'} + app_settings1_input = ['key1=val1', 'key2=val2==', 'key3=val3='] + app_settings1_dict = {'key1': 'val1', 'key2': 'val2==', 'key3': 'val3='} self.staticapp_client.list.return_value = [self.app1, self.app2] set_staticsite_function_app_settings(self.mock_cmd, self.name1, app_settings1_input)