query_name
stringlengths
13
55
code_file_path
stringlengths
14
194
context_blocks
list
answer_spans
list
supporting_fact_spans
list
example_type
int8
0
1
single_hop
bool
2 classes
subtokenized_input_sequence
sequence
label_sequence
sequence
Unused local variable
brack3t/Djrill/djrill/tests/test_mandrill_webhook.py
[ { "content": " def test_post_request_invalid_json(self):\n response = self.client.post('/webhook/?secret=abc123')\n self.assertEqual(response.status_code, 400)", "metadata": "root.DjrillWebhookViewTests.test_post_request_invalid_json", "header": "['class', 'DjrillWebhookViewTests', '(', 'TestCase', ')', ':', '___EOS___']", "index": 77 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Dj", "rill", "Web", "hook", "View", "Tests_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "post", "\\u", "request", "\\u", "invalid", "\\u", "json_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "client_", "._", "post_", "(_", "'/", "webho", "ok", "/?", "secret", "=", "abc", "123", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "response_", "._", "status", "\\u", "code_", ",_", "400_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
First parameter of a method is not named 'self'
kvh/ramp/ramp/selectors.py
[ { "content": " def sets_cv(self, x, y):\n totals = [0]*len(x.columns)\n if self.min:\n totals = [1000] * len(x.columns)\n i = 0\n for train, test in cross_validation.KFold(n=len(y), k=4):\n i += 1\n logging.info(\"RF selector computing importances for fold {i}\".format(i=i))\n cls = ensemble.RandomForestRegressor\n if self.classifier:\n cls = ensemble.RandomForestClassifier\n rf = cls(n_estimators=self.n,\n random_state=self.seed,\n n_jobs=-1)\n rf.fit(x.values[train], y.values[train])\n importances = rf.feature_importances_\n if self.min:\n totals = [min(imp, t) for imp, t in zip(importances, totals)]\n else:\n totals = [imp + t for imp, t in zip(importances, totals)]\n imps = sorted(zip(totals, x.columns),\n reverse=True)\n for i, x in enumerate(imps):\n imp, f = x\n logging.debug('%d\\t%0.4f\\t%s' % (i, imp, f))\n if self.thresh:\n imps = [t for t in imps if t[0] > self.thresh]\n sets = [[t[1] for t in imps[:i+1]] for i in range(len(imps))]\n return sets", "metadata": "root.RandomForestSelector.sets_cv", "header": "['class', 'RandomForestSelector', '(', 'Selector', ')', ':', '___EOS___']", "index": 51 } ]
[]
[]
0
true
[ "[CLS]_", "First_", "parameter_", "of_", "a_", "method_", "is_", "not_", "named_", "'", "self", "'_", "[SEP]_", "class_", "Random", "Fore", "st", "Selector_", "(_", "Selector_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "sets", "\\u", "cv_", "(_", "self_", ",_", "x_", ",_", "y_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "totals_", "=_", "[_", "0_", "]_", "*_", "len_", "(_", "x_", "._", "columns_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "min_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "totals_", "=_", "[_", "1000_", "]_", "*_", "len_", "(_", "x_", "._", "columns_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "i_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "train_", ",_", "test_", "in_", "cross", "\\u", "validation_", "._", "KF", "old_", "(_", "n_", "=_", "len_", "(_", "y_", ")_", ",_", "k_", "=_", "4_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "i_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logging_", "._", "info_", "(_", "\"", "RF", " ", "select", "or", " ", "compu", "ting", " ", "importance", "s", " ", "for", " ", "fold", " ", "{", "i", "}\"_", "._", "format_", "(_", "i_", "=_", "i_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "=_", "ensemble_", "._", "Random", "Fore", "st", "Regressor_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "classifier_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cls_", "=_", "ensemble_", "._", "Random", "Fore", "st", "Classifier_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "rf_", "=_", "cls_", "(_", "n", "\\u", "estimators_", "=_", "self_", "._", "n_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "random", "\\u", "state_", "=_", "self_", "._", "seed_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "n", "\\u", "jobs_", "=_", "-_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "rf_", "._", "fit_", "(_", "x_", "._", "values_", "[_", "train_", "]_", ",_", "y_", "._", "values_", "[_", "train_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "importance", "s_", "=_", "rf_", "._", "feature", "\\u", "importance", "s\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "min_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "totals_", "=_", "[_", "min_", "(_", "imp_", ",_", "t_", ")_", "for_", "imp_", ",_", "t_", "in_", "zip_", "(_", "importance", "s_", ",_", "totals_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "totals_", "=_", "[_", "imp_", "+_", "t_", "for_", "imp_", ",_", "t_", "in_", "zip_", "(_", "importance", "s_", ",_", "totals_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "imp", "s_", "=_", "sorted_", "(_", "zip_", "(_", "totals_", ",_", "x_", "._", "columns_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "reverse_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", ",_", "x_", "in_", "enumerate_", "(_", "imp", "s_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "imp_", ",_", "f_", "=_", "x_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logging_", "._", "debug_", "(_", "'%", "d", "\\\\", "t", "%", "0.", "4f", "\\\\", "t", "%", "s", "'_", "%_", "(_", "i_", ",_", "imp_", ",_", "f_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "self_", "._", "thresh_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "imp", "s_", "=_", "[_", "t_", "for_", "t_", "in_", "imp", "s_", "if_", "t_", "[_", "0_", "]_", ">_", "self_", "._", "thresh_", "]_", "\\u\\u\\uNEWLINE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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
pantsbuild/pex/tests/test_pex_binary.py
[ { "content": "def test_clp_no_pypi_option():\n with parser_pair() as (builder, parser):\n configure_clp_pex_resolution(parser, builder)\n assert len(builder._fetchers) == 1\n options, _ = parser.parse_args(args=['--no-pypi'])\n assert len(builder._fetchers) == 0, '--no-pypi should remove fetchers.'\n assert options.repos == builder._fetchers", "metadata": "root.test_clp_no_pypi_option", "header": "['module', '___EOS___']", "index": 20 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "cl", "p", "\\u", "no", "\\u", "pypi", "\\u", "option_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "parser", "\\u", "pair_", "(_", ")_", "as_", "(_", "builder_", ",_", "parser_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "configur", "e\\u", "cl", "p", "\\u", "pex", "\\u", "resolution_", "(_", "parser_", ",_", "builder_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "builder_", "._", "\\u", "fetch", "ers_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "options_", ",_", "\\u_", "=_", "parser_", "._", "parse", "\\u", "args_", "(_", "args_", "=_", "[_", "'--", "no", "-", "pypi", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "builder_", "._", "\\u", "fetch", "ers_", ")_", "==_", "0_", ",_", "'--", "no", "-", "pypi", " ", "shou", "ld", " ", "remove", " ", "fetch", "ers", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "options_", "._", "repos_", "==_", "builder_", "._", "\\u", "fetch", "ers_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Comparison of constants
GoogleCloudPlatform/gcloud-python/scripts/run_pylint.py
[ { "content": "def is_production_filename(filename):\n \"\"\"Checks if the file contains production code.\n\n :rtype: bool\n :returns: Boolean indicating production status.\n \"\"\"\n return 'test' not in filename and 'docs' not in filename", "metadata": "root.is_production_filename", "header": "['module', '___EOS___']", "index": 121 } ]
[]
[]
0
true
[ "[CLS]_", "Compari", "son_", "of_", "constants_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "\\u", "producti", "on", "\\u", "filename_", "(_", "filename_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Check", "s", " ", "if", " ", "the", " ", "file", " ", "contain", "s", " ", "producti", "on", " ", "code", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", ":", "rty", "pe", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", ":", "return", "s", ":", " ", "Boo", "lean", " ", "indicati", "ng", " ", "producti", "on", " ", "status", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "'", "test", "'_", "not_", "in_", "filename_", "and_", "'", "docs", "'_", "not_", "in_", "filename_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
home-assistant/home-assistant/homeassistant/components/sensor/temper.py
[ { "content": " @property\n def state(self):\n \"\"\"Return the state of the entity.\"\"\"\n return self.current_value", "metadata": "root.TemperSensor.state", "header": "['class', 'TemperSensor', '(', 'Entity', ')', ':', '___EOS___']", "index": 45 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Tempe", "r", "Sensor_", "(_", "Entity_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "state_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Return", " ", "the", " ", "state", " ", "of", " ", "the", " ", "entity", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "current", "\\u", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
openstack/cloudbase-init/cloudbaseinit/tests/osutils/test_windows.py
[ { "content": "# Copyright 2013 Cloudbase Solutions Srl\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n\n\nimport contextlib\nimport functools\nimport importlib\nimport os\n\ntry:\n import unittest.mock as mock\nexcept ImportError:\n import mock\nfrom oslo_config import cfg\nimport six\n\nfrom cloudbaseinit import exception\nfrom cloudbaseinit.tests import fake\nfrom cloudbaseinit.tests import testutils\n\nCONF = cfg.CONF\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class WMIError(Exception):\n\n com_error = \"fake data\"", "metadata": "root.WMIError", "header": "['module', '___EOS___']", "index": 34 }, { "content": "class TestWindowsUtils(testutils.CloudbaseInitTestBase):\n '''Tests for the windows utils class.'''\n\n _CONFIG_NAME = 'FakeConfig'\n _DESTINATION = '192.168.192.168'\n _GATEWAY = '10.7.1.1'\n _NETMASK = '255.255.255.0'\n _PASSWORD = 'Passw0rd'\n _SECTION = 'fake_section'\n _USERNAME = 'Admin'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.TestWindowsUtils", "header": "['module', '___EOS___']", "index": 39 }, { "content": " def setUp(self):\n self._pywintypes_mock = mock.MagicMock()\n self._pywintypes_mock.com_error = fake.FakeComError\n self._win32com_mock = mock.MagicMock()\n self._win32process_mock = mock.MagicMock()\n self._win32security_mock = mock.MagicMock()\n self._win32net_mock = mock.MagicMock()\n self._win32netcon_mock = mock.MagicMock()\n self._wmi_mock = mock.MagicMock()\n self._wmi_mock.x_wmi = WMIError\n self._moves_mock = mock.MagicMock()\n self._xmlrpc_client_mock = mock.MagicMock()\n self._ctypes_mock = mock.MagicMock()\n self._tzlocal_mock = mock.Mock()\n\n self._win32net_mock.error = Exception\n module_path = \"cloudbaseinit.osutils.windows\"\n\n _module_patcher = mock.patch.dict(\n 'sys.modules',\n {'win32com': self._win32com_mock,\n 'win32process': self._win32process_mock,\n 'win32security': self._win32security_mock,\n 'win32net': self._win32net_mock,\n 'win32netcon': self._win32netcon_mock,\n 'wmi': self._wmi_mock,\n 'six.moves': self._moves_mock,\n 'six.moves.xmlrpc_client': self._xmlrpc_client_mock,\n 'ctypes': self._ctypes_mock,\n 'pywintypes': self._pywintypes_mock,\n 'tzlocal': self._tzlocal_mock,\n 'winioctlcon': mock.MagicMock()})\n _module_patcher.start()\n self.addCleanup(_module_patcher.stop)\n\n exception.ctypes.GetLastError = mock.MagicMock()\n exception.ctypes.FormatError = mock.MagicMock()\n with mock.patch(\"cloudbaseinit.utils.windows.disk.GUID\"):\n self.windows_utils = importlib.import_module(module_path)\n\n self._winreg_mock = self._moves_mock.winreg\n self._windll_mock = self._ctypes_mock.windll\n self._wintypes_mock = self._ctypes_mock.wintypes\n self._client_mock = self._win32com_mock.client\n self.windows_utils.WindowsError = mock.MagicMock()\n\n self._winutils = self.windows_utils.WindowsUtils()\n self._kernel32 = self._windll_mock.kernel32\n self._iphlpapi = self._windll_mock.iphlpapi\n self._ntdll = self._windll_mock.ntdll\n\n self.snatcher = testutils.LogSnatcher(module_path)", "metadata": "root.TestWindowsUtils.setUp", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 50 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.privilege')\n def _test_reboot(self, mock_privilege_module, ret_value,\n expected_ret_value=None):\n mock_privilege_module.acquire_privilege = mock.MagicMock()\n advapi32 = self._windll_mock.advapi32\n advapi32.InitiateSystemShutdownExW = mock.MagicMock(\n return_value=ret_value)\n\n if not ret_value:\n with self.assert_raises_windows_message(\n \"Reboot failed: %r\", expected_ret_value):\n self._winutils.reboot()\n else:\n self._winutils.reboot()\n\n advapi32.InitiateSystemShutdownExW.assert_called_with(\n 0,\n \"Cloudbase-Init reboot\",\n 0, True, True, 0)\n mock_privilege_module.acquire_privilege.assert_called_once_with(\n self._win32security_mock.SE_SHUTDOWN_NAME)", "metadata": "root.TestWindowsUtils._test_reboot", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 103 }, { "content": " def test_reboot(self):\n self._test_reboot(ret_value=True)", "metadata": "root.TestWindowsUtils.test_reboot", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 125 }, { "content": " def test_reboot_failed(self):\n self._test_reboot(ret_value=None, expected_ret_value=100)", "metadata": "root.TestWindowsUtils.test_reboot_failed", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 128 }, { "content": " def _test_get_user_info(self, exc=None):\n userget_mock = self._win32net_mock.NetUserGetInfo\n level = mock.Mock()\n ret = mock.Mock()\n if exc:\n userget_mock.side_effect = [exc]\n error_class = (\n exception.ItemNotFoundException if\n exc.args[0] == self._winutils.NERR_UserNotFound else\n exception.CloudbaseInitException)\n with self.assertRaises(error_class):\n self._winutils._get_user_info(self._USERNAME, level)\n return\n userget_mock.return_value = ret\n response = self._winutils._get_user_info(self._USERNAME, level)\n userget_mock.assert_called_once_with(None, self._USERNAME, level)\n self.assertEqual(ret, response)", "metadata": "root.TestWindowsUtils._test_get_user_info", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 131 }, { "content": " def test_get_user_info(self):\n self._test_get_user_info()", "metadata": "root.TestWindowsUtils.test_get_user_info", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 149 }, { "content": " def test_get_user_info_not_found(self):\n exc = self._win32net_mock.error(self._winutils.NERR_UserNotFound,\n *([mock.Mock()] * 2))\n self._test_get_user_info(exc=exc)", "metadata": "root.TestWindowsUtils.test_get_user_info_not_found", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 152 }, { "content": " def test_get_user_info_failed(self):\n exc = self._win32net_mock.error(*([mock.Mock()] * 3))\n self._test_get_user_info(exc=exc)", "metadata": "root.TestWindowsUtils.test_get_user_info_failed", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 157 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_user_info')\n def _test_set_user_password(self, mock_get_user_info,\n expire=False, fail=False):\n user_info = mock.MagicMock()\n mock_get_user_info.return_value = user_info\n user_info[\"password\"] = self._PASSWORD\n if expire:\n user_info[\"flags\"] &= \\\n ~self._win32netcon_mock.UF_DONT_EXPIRE_PASSWD\n else:\n user_info[\"flags\"] |= \\\n self._win32netcon_mock.UF_DONT_EXPIRE_PASSWD\n if fail:\n self._win32net_mock.NetUserSetInfo.side_effect = [\n self._win32net_mock.error(*([mock.Mock()] * 3))]\n with self.assertRaises(exception.CloudbaseInitException):\n self._winutils.set_user_password(self._USERNAME,\n self._PASSWORD)\n return\n self._winutils.set_user_password(self._USERNAME, self._PASSWORD,\n password_expires=expire)\n mock_get_user_info.assert_called_once_with(self._USERNAME, 1)\n self._win32net_mock.NetUserSetInfo.assert_called_once_with(\n None, self._USERNAME, 1, user_info)", "metadata": "root.TestWindowsUtils._test_set_user_password", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 161 }, { "content": " def test_set_user_password(self):\n self._test_set_user_password()", "metadata": "root.TestWindowsUtils.test_set_user_password", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 187 }, { "content": " def test_set_user_password_expire(self):\n self._test_set_user_password(expire=True)", "metadata": "root.TestWindowsUtils.test_set_user_password_expire", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 190 }, { "content": " def test_set_user_password_fail(self):\n self._test_set_user_password(fail=True)", "metadata": "root.TestWindowsUtils.test_set_user_password_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 193 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_user_info')\n def _test_change_password_next_logon(self, mock_get_user_info,\n fail=False):\n user_info = mock.MagicMock()\n mock_get_user_info.return_value = user_info\n user_info[\"flags\"] &= ~self._win32netcon_mock.UF_DONT_EXPIRE_PASSWD\n user_info[\"password_expired\"] = 1\n if fail:\n self._win32net_mock.NetUserSetInfo.side_effect = [\n self._win32net_mock.error(*([mock.Mock()] * 3))]\n with self.assertRaises(exception.CloudbaseInitException):\n self._winutils.change_password_next_logon(self._USERNAME)\n return\n self._winutils.change_password_next_logon(self._USERNAME)\n self._win32net_mock.NetUserSetInfo.assert_called_once_with(\n None, self._USERNAME, 4, user_info)", "metadata": "root.TestWindowsUtils._test_change_password_next_logon", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 196 }, { "content": " def test_change_password_next_logon(self):\n self._test_change_password_next_logon()", "metadata": "root.TestWindowsUtils.test_change_password_next_logon", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 214 }, { "content": " def test_change_password_next_logon_fail(self):\n self._test_change_password_next_logon(fail=True)", "metadata": "root.TestWindowsUtils.test_change_password_next_logon_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 217 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_user_info')\n def _test_user_exists(self, mock_get_user_info, exists):\n if not exists:\n mock_get_user_info.side_effect = [exception.ItemNotFoundException]\n response = self._winutils.user_exists(self._USERNAME)\n self.assertEqual(False, response)\n return\n response = self._winutils.user_exists(self._USERNAME)\n mock_get_user_info.assert_called_once_with(self._USERNAME, 1)\n self.assertEqual(True, response)", "metadata": "root.TestWindowsUtils._test_user_exists", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 220 }, { "content": " def test_user_exists(self):\n self._test_user_exists(exists=True)", "metadata": "root.TestWindowsUtils.test_user_exists", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 232 }, { "content": " def test_user_does_not_exist(self):\n self._test_user_exists(exists=False)", "metadata": "root.TestWindowsUtils.test_user_does_not_exist", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 235 }, { "content": " def test_sanitize_shell_input(self):\n unsanitised = ' \" '\n response = self._winutils.sanitize_shell_input(unsanitised)\n sanitised = ' \\\\\" '\n self.assertEqual(sanitised, response)", "metadata": "root.TestWindowsUtils.test_sanitize_shell_input", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 238 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils.'\n '_get_cch_referenced_domain_name')\n def _test_get_user_sid_and_domain(self, mock_cch_referenced,\n ret_val, last_error=None):\n cbSid = mock.Mock()\n sid = mock.Mock()\n size = 1024\n cchReferencedDomainName = mock.Mock()\n domainName = mock.Mock()\n sidNameUse = mock.Mock()\n advapi32 = self._windll_mock.advapi32\n mock_cch_referenced.return_value = cchReferencedDomainName\n\n self._ctypes_mock.create_string_buffer.return_value = sid\n self._ctypes_mock.sizeof.return_value = size\n self._ctypes_mock.create_unicode_buffer.return_value = domainName\n\n advapi32.LookupAccountNameW.return_value = ret_val\n\n if ret_val is None:\n with self.assert_raises_windows_message(\n \"Cannot get user SID: %r\",\n last_error):\n self._winutils._get_user_sid_and_domain(\n self._USERNAME)\n else:\n response = self._winutils._get_user_sid_and_domain(self._USERNAME)\n\n advapi32.LookupAccountNameW.assert_called_with(\n 0, six.text_type(self._USERNAME), sid,\n self._ctypes_mock.byref(cbSid), domainName,\n self._ctypes_mock.byref(cchReferencedDomainName),\n self._ctypes_mock.byref(sidNameUse))\n self.assertEqual((sid, domainName.value), response)\n mock_cch_referenced.assert_called_once_with(\n self._ctypes_mock.create_unicode_buffer.return_value)", "metadata": "root.TestWindowsUtils._test_get_user_sid_and_domain", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 244 }, { "content": " def test_get_cch_referenced_domain_name(self):\n self._ctypes_mock.sizeof.side_effect = [42, 24]\n\n result = self._winutils._get_cch_referenced_domain_name(\n mock.sentinel.domain_name)\n\n self._wintypes_mock.DWORD.assert_called_once_with(42 // 24)\n self.assertEqual(result, self._wintypes_mock.DWORD.return_value)", "metadata": "root.TestWindowsUtils.test_get_cch_referenced_domain_name", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 281 }, { "content": " def test_get_user_sid_and_domain(self):\n fake_obj = mock.Mock()\n self._test_get_user_sid_and_domain(ret_val=fake_obj)", "metadata": "root.TestWindowsUtils.test_get_user_sid_and_domain", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 290 }, { "content": " def test_get_user_sid_and_domain_no_return_value(self):\n self._test_get_user_sid_and_domain(ret_val=None, last_error=100)", "metadata": "root.TestWindowsUtils.test_get_user_sid_and_domain_no_return_value", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 294 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows'\n '.Win32_LOCALGROUP_MEMBERS_INFO_3')\n def _test_add_user_to_local_group(self,\n mock_Win32_LOCALGROUP_MEMBERS_INFO_3,\n ret_value):\n lmi = mock_Win32_LOCALGROUP_MEMBERS_INFO_3()\n group_name = 'Admins'\n netapi32 = self._windll_mock.netapi32\n\n netapi32.NetLocalGroupAddMembers.return_value = ret_value\n\n is_in_alias = ret_value != self._winutils.ERROR_MEMBER_IN_ALIAS\n\n if ret_value is not 0 and is_in_alias:\n self.assertRaises(\n exception.CloudbaseInitException,\n self._winutils.add_user_to_local_group,\n self._USERNAME, group_name)\n else:\n self._winutils.add_user_to_local_group(self._USERNAME,\n group_name)\n\n netapi32.NetLocalGroupAddMembers.assert_called_with(\n 0, six.text_type(group_name), 3,\n self._ctypes_mock.addressof.return_value, 1)\n\n self._ctypes_mock.addressof.assert_called_once_with(lmi)\n self.assertEqual(lmi.lgrmi3_domainandname,\n six.text_type(self._USERNAME))", "metadata": "root.TestWindowsUtils._test_add_user_to_local_group", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 297 }, { "content": " def test_add_user_to_local_group_no_error(self):\n self._test_add_user_to_local_group(ret_value=0)", "metadata": "root.TestWindowsUtils.test_add_user_to_local_group_no_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 327 }, { "content": " def test_add_user_to_local_group_not_found(self):\n self._test_add_user_to_local_group(\n ret_value=self._winutils.NERR_GroupNotFound)", "metadata": "root.TestWindowsUtils.test_add_user_to_local_group_not_found", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 330 }, { "content": " def test_add_user_to_local_group_access_denied(self):\n self._test_add_user_to_local_group(\n ret_value=self._winutils.ERROR_ACCESS_DENIED)", "metadata": "root.TestWindowsUtils.test_add_user_to_local_group_access_denied", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 334 }, { "content": " def test_add_user_to_local_group_no_member(self):\n self._test_add_user_to_local_group(\n ret_value=self._winutils.ERROR_NO_SUCH_MEMBER)", "metadata": "root.TestWindowsUtils.test_add_user_to_local_group_no_member", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 338 }, { "content": " def test_add_user_to_local_group_member_in_alias(self):\n self._test_add_user_to_local_group(\n ret_value=self._winutils.ERROR_MEMBER_IN_ALIAS)", "metadata": "root.TestWindowsUtils.test_add_user_to_local_group_member_in_alias", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 342 }, { "content": " def test_add_user_to_local_group_invalid_member(self):\n self._test_add_user_to_local_group(\n ret_value=self._winutils.ERROR_INVALID_MEMBER)", "metadata": "root.TestWindowsUtils.test_add_user_to_local_group_invalid_member", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 346 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_user_info')\n def _test_get_user_sid(self, mock_get_user_info, fail):\n if fail:\n mock_get_user_info.side_effect = [exception.ItemNotFoundException]\n response = self._winutils.get_user_sid(self._USERNAME)\n self.assertEqual(None, response)\n return\n user_info = mock.MagicMock()\n mock_get_user_info.return_value = user_info\n response = self._winutils.get_user_sid(self._USERNAME)\n mock_get_user_info.assert_called_once_with(self._USERNAME, 4)\n self.assertEqual(response, str(user_info[\"user_sid\"])[6:])", "metadata": "root.TestWindowsUtils._test_get_user_sid", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 350 }, { "content": " def test_get_user_sid(self):\n self._test_get_user_sid(fail=False)", "metadata": "root.TestWindowsUtils.test_get_user_sid", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 364 }, { "content": " def test_get_user_sid_fail(self):\n self._test_get_user_sid(fail=True)", "metadata": "root.TestWindowsUtils.test_get_user_sid_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 367 }, { "content": " def _test_create_user(self, expire=False, fail=False):\n user_info = {\n \"name\": self._USERNAME,\n \"password\": self._PASSWORD,\n \"priv\": self._win32netcon_mock.USER_PRIV_USER,\n \"flags\": (self._win32netcon_mock.UF_NORMAL_ACCOUNT |\n self._win32netcon_mock.UF_SCRIPT)\n }\n if not expire:\n user_info[\"flags\"] |= self._win32netcon_mock.UF_DONT_EXPIRE_PASSWD\n\n if fail:\n self._win32net_mock.NetUserAdd.side_effect = [\n self._win32net_mock.error(*([mock.Mock()] * 3))]\n with self.assertRaises(exception.CloudbaseInitException):\n self._winutils.create_user(self._USERNAME,\n self._PASSWORD)\n return\n self._winutils.create_user(self._USERNAME, self._PASSWORD,\n password_expires=expire)\n self._win32net_mock.NetUserAdd.assert_called_once_with(\n None, 1, user_info)", "metadata": "root.TestWindowsUtils._test_create_user", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 370 }, { "content": " def test_create_user(self):\n self._test_create_user()", "metadata": "root.TestWindowsUtils.test_create_user", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 393 }, { "content": " def test_create_user_expire(self):\n self._test_create_user(expire=True)", "metadata": "root.TestWindowsUtils.test_create_user_expire", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 396 }, { "content": " def test_create_user_fail(self):\n self._test_create_user(fail=True)", "metadata": "root.TestWindowsUtils.test_create_user_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 399 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.Win32_PROFILEINFO')\n def _test_create_user_logon_session(self, mock_Win32_PROFILEINFO, logon,\n loaduser, load_profile=True,\n last_error=None):\n self._wintypes_mock.HANDLE = mock.MagicMock()\n pi = self.windows_utils.Win32_PROFILEINFO()\n advapi32 = self._windll_mock.advapi32\n userenv = self._windll_mock.userenv\n kernel32 = self._windll_mock.kernel32\n\n advapi32.LogonUserW.return_value = logon\n\n if not logon:\n with self.assert_raises_windows_message(\n \"User logon failed: %r\", last_error):\n self._winutils.create_user_logon_session(\n self._USERNAME, self._PASSWORD, domain='.',\n load_profile=load_profile)\n\n elif load_profile and not loaduser:\n userenv.LoadUserProfileW.return_value = None\n kernel32.CloseHandle.return_value = None\n with self.assert_raises_windows_message(\n \"Cannot load user profile: %r\", last_error):\n self._winutils.create_user_logon_session(\n self._USERNAME, self._PASSWORD, domain='.',\n load_profile=load_profile)\n\n userenv.LoadUserProfileW.assert_called_with(\n self._wintypes_mock.HANDLE.return_value,\n self._ctypes_mock.byref.return_value)\n self._ctypes_mock.byref.assert_called_with(pi)\n\n kernel32.CloseHandle.assert_called_with(\n self._wintypes_mock.HANDLE.return_value)\n\n elif not load_profile:\n response = self._winutils.create_user_logon_session(\n self._USERNAME, self._PASSWORD, domain='.',\n load_profile=load_profile)\n self.assertTrue(response is not None)\n else:\n size = 1024\n self._ctypes_mock.sizeof.return_value = size\n\n mock_Win32_PROFILEINFO.return_value = loaduser\n\n response = self._winutils.create_user_logon_session(\n self._USERNAME, self._PASSWORD, domain='.',\n load_profile=load_profile)\n\n userenv.LoadUserProfileW.assert_called_with(\n self._wintypes_mock.HANDLE.return_value,\n self._ctypes_mock.byref.return_value)\n self.assertTrue(response is not None)", "metadata": "root.TestWindowsUtils._test_create_user_logon_session", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 402 }, { "content": " def test_create_user_logon_session_fail_load_false(self):\n self._test_create_user_logon_session(logon=0, loaduser=0,\n load_profile=True,\n last_error=100)", "metadata": "root.TestWindowsUtils.test_create_user_logon_session_fail_load_false", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 458 }, { "content": " def test_create_user_logon_session_fail_load_true(self):\n self._test_create_user_logon_session(logon=0, loaduser=0,\n load_profile=False,\n last_error=100)", "metadata": "root.TestWindowsUtils.test_create_user_logon_session_fail_load_true", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 463 }, { "content": " def test_create_user_logon_session_load_true(self):\n m = mock.Mock()\n n = mock.Mock()\n self._test_create_user_logon_session(logon=m, loaduser=n,\n load_profile=True)", "metadata": "root.TestWindowsUtils.test_create_user_logon_session_load_true", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 468 }, { "content": " def test_create_user_logon_session_load_false(self):\n m = mock.Mock()\n n = mock.Mock()\n self._test_create_user_logon_session(logon=m, loaduser=n,\n load_profile=False)", "metadata": "root.TestWindowsUtils.test_create_user_logon_session_load_false", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 474 }, { "content": " def test_create_user_logon_session_no_load_true(self):\n m = mock.Mock()\n self._test_create_user_logon_session(logon=m, loaduser=None,\n load_profile=True,\n last_error=100)", "metadata": "root.TestWindowsUtils.test_create_user_logon_session_no_load_true", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 480 }, { "content": " def test_create_user_logon_session_no_load_false(self):\n m = mock.Mock()\n self._test_create_user_logon_session(logon=m, loaduser=None,\n load_profile=False,\n last_error=100)", "metadata": "root.TestWindowsUtils.test_create_user_logon_session_no_load_false", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 486 }, { "content": " def test_close_user_logon_session(self):\n token = mock.Mock()\n self._windll_mock.kernel32.CloseHandle = mock.MagicMock()\n\n self._winutils.close_user_logon_session(token)\n\n self._windll_mock.kernel32.CloseHandle.assert_called_with(token)", "metadata": "root.TestWindowsUtils.test_close_user_logon_session", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 492 }, { "content": " @mock.patch('ctypes.windll.kernel32.SetComputerNameExW')\n def _test_set_host_name(self, mock_SetComputerNameExW, ret_value,\n last_error=None):\n mock_SetComputerNameExW.return_value = ret_value\n\n if not ret_value:\n with self.assert_raises_windows_message(\n \"Cannot set host name: %r\", last_error):\n self._winutils.set_host_name('fake name')\n else:\n self.assertTrue(self._winutils.set_host_name('fake name'))\n\n mock_SetComputerNameExW.assert_called_with(\n self._winutils.ComputerNamePhysicalDnsHostname,\n six.text_type('fake name'))", "metadata": "root.TestWindowsUtils._test_set_host_name", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 500 }, { "content": " def test_set_host_name(self):\n self._test_set_host_name(ret_value='fake response')", "metadata": "root.TestWindowsUtils.test_set_host_name", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 516 }, { "content": " def test_set_host_exception(self):\n self._test_set_host_name(ret_value=None, last_error=100)", "metadata": "root.TestWindowsUtils.test_set_host_exception", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 519 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_user_sid')\n def _test_get_user_home(self, user_sid, mock_get_user_sid):\n mock_get_user_sid.return_value = user_sid\n\n with self.snatcher:\n response = self._winutils.get_user_home(self._USERNAME)\n\n if user_sid:\n mock_get_user_sid.assert_called_with(self._USERNAME)\n self._winreg_mock.OpenKey.assert_called_with(\n self._winreg_mock.HKEY_LOCAL_MACHINE,\n 'SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\'\n 'ProfileList\\\\%s' % mock_get_user_sid())\n self.assertTrue(response is not None)\n self._winreg_mock.QueryValueEx.assert_called_with(\n self._winreg_mock.OpenKey.return_value.__enter__.return_value,\n 'ProfileImagePath')\n else:\n self.assertEqual(\n [\"Home directory not found for user %r\" % self._USERNAME],\n self.snatcher.output)\n self.assertTrue(response is None)", "metadata": "root.TestWindowsUtils._test_get_user_home", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 522 }, { "content": " def test_get_user_home(self):\n user = mock.MagicMock()\n self._test_get_user_home(user)", "metadata": "root.TestWindowsUtils.test_get_user_home", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 546 }, { "content": " def test_get_user_home_fail(self):\n self._test_get_user_home(None)", "metadata": "root.TestWindowsUtils.test_get_user_home_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 550 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.check_os_version')\n def _test_get_network_adapters(self, is_xp_2003, mock_check_os_version):\n conn = self._wmi_mock.WMI\n mock_response = mock.MagicMock()\n conn.return_value.query.return_value = [mock_response]\n\n mock_check_os_version.return_value = not is_xp_2003\n\n wql = ('SELECT * FROM Win32_NetworkAdapter WHERE '\n 'AdapterTypeId = 0 AND MACAddress IS NOT NULL')\n\n if not is_xp_2003:\n wql += ' AND PhysicalAdapter = True'\n\n response = self._winutils.get_network_adapters()\n conn.return_value.query.assert_called_with(wql)\n self.assertEqual([(mock_response.Name, mock_response.MACAddress)],\n response)", "metadata": "root.TestWindowsUtils._test_get_network_adapters", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 553 }, { "content": " def test_get_network_adapters(self):\n self._test_get_network_adapters(False)", "metadata": "root.TestWindowsUtils.test_get_network_adapters", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 573 }, { "content": " def test_get_network_adapters_xp_2003(self):\n self._test_get_network_adapters(True)", "metadata": "root.TestWindowsUtils.test_get_network_adapters_xp_2003", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 576 }, { "content": " def _test_set_static_network_config(self, adapter=True, static_val=(0,),\n gateway_val=(0,), dns_val=(0,)):\n conn = self._wmi_mock.WMI\n mac_address = '54:EE:75:19:F4:61'\n address = '10.10.10.10'\n broadcast = '0.0.0.0'\n dns_list = ['8.8.8.8']\n set_static_call = functools.partial(\n self._winutils.set_static_network_config,\n mac_address, address, self._NETMASK,\n broadcast, self._GATEWAY, dns_list\n )\n\n if adapter:\n adapter = mock.MagicMock()\n else:\n self.assertRaises(\n exception.CloudbaseInitException,\n set_static_call\n )\n return\n\n expected_log = []\n for (ret_val,), msg in ((static_val, \"Setting static IP address\"),\n (gateway_val, \"Setting static gateways\"),\n (dns_val, \"Setting static DNS servers\")):\n if ret_val in (0, 1):\n expected_log.append(msg)\n\n conn.return_value.query.return_value = adapter\n adapter_config = adapter[0].associators.return_value[0]\n adapter_config.EnableStatic.return_value = static_val\n adapter_config.SetGateways.return_value = gateway_val\n adapter_config.SetDNSServerSearchOrder.return_value = dns_val\n adapter.__len__.return_value = 1\n if static_val[0] > 1 or gateway_val[0] > 1 or dns_val[0] > 1:\n self.assertRaises(\n exception.CloudbaseInitException,\n set_static_call)\n else:\n with self.snatcher:\n response = set_static_call()\n if static_val[0] or gateway_val[0] or dns_val[0]:\n self.assertTrue(response)\n else:\n self.assertFalse(response)\n self.assertEqual(expected_log, self.snatcher.output)\n\n select = (\"SELECT * FROM Win32_NetworkAdapter WHERE \"\n \"MACAddress = '{}'\".format(mac_address))\n conn.return_value.query.assert_called_once_with(select)\n adapter[0].associators.assert_called_with(\n wmi_result_class='Win32_NetworkAdapterConfiguration')\n adapter_config.EnableStatic.assert_called_with(\n [address], [self._NETMASK])\n adapter_config.SetGateways.assert_called_with(\n [self._GATEWAY], [1])\n adapter_config.SetDNSServerSearchOrder.assert_called_with(\n dns_list)", "metadata": "root.TestWindowsUtils._test_set_static_network_config", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 579 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.check_os_version')\n @mock.patch(\"cloudbaseinit.utils.windows.network\"\n \".get_adapter_addresses\")\n def _test_set_static_network_config_v6(self, mock_get_adapter_addresses,\n mock_check_os_version,\n v6adapters=True, v6error=False):\n friendly_name = \"Ethernet0\"\n interface_index = \"4\"\n mac_address = '54:EE:75:19:F4:61'\n address6 = \"2001:db8::3\"\n netmask6 = \"64\"\n gateway6 = \"2001:db8::1\"\n\n conn = self._wmi_mock.WMI\n netip = conn.return_value.query.return_value[0]\n if v6error:\n netip.Create.side_effect = WMIError\n adapter_addresses = []\n if v6adapters:\n adapter_addresses = [\n {\n \"mac_address\": mac_address,\n \"friendly_name\": friendly_name,\n \"interface_index\": interface_index\n }\n ]\n mock_get_adapter_addresses.return_value = adapter_addresses\n mock_check_os_version.return_value = True\n\n set_static_call = functools.partial(\n self._winutils.set_static_network_config_v6,\n mac_address, address6, netmask6, gateway6)\n expected_log = []\n if not mock_check_os_version.return_value:\n expected_log.append(\"Setting IPv6 info not available \"\n \"on this system\")\n\n if not v6adapters or v6error:\n self.assertRaises(\n exception.CloudbaseInitException,\n set_static_call)\n else:\n expected_log.append(\"Setting IPv6 info for %s\" % friendly_name)\n with self.snatcher:\n set_static_call()\n mock_get_adapter_addresses.assert_called_once_with()\n select = (\"SELECT * FROM MSFT_NetIPAddress \"\n \"WHERE InterfaceAlias = '{}'\".format(friendly_name))\n conn.return_value.query.assert_called_once_with(select)\n params = {\n \"InterfaceIndex\": interface_index,\n \"InterfaceAlias\": friendly_name,\n \"IPAddress\": address6,\n \"AddressFamily\": self.windows_utils.AF_INET6,\n \"PrefixLength\": netmask6,\n # Manual set type.\n \"Type\": self.windows_utils.UNICAST,\n \"PrefixOrigin\": self.windows_utils.MANUAL,\n \"SuffixOrigin\": self.windows_utils.MANUAL,\n \"AddressState\": self.windows_utils.PREFERRED_ADDR,\n # No expiry.\n \"ValidLifetime\": None,\n \"PreferredLifetime\": None,\n \"SkipAsSource\": False,\n \"DefaultGateway\": gateway6,\n \"PolicyStore\": None,\n \"PassThru\": False,\n }\n netip.Create.assert_called_once_with(**params)\n self.assertEqual(expected_log, self.snatcher.output)", "metadata": "root.TestWindowsUtils._test_set_static_network_config_v6", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 639 }, { "content": " def test_set_static_network_config(self):\n ret_val1 = (1,)\n ret_val2 = (1,)\n ret_val3 = (0,)\n self._test_set_static_network_config(static_val=ret_val1,\n gateway_val=ret_val2,\n dns_val=ret_val3)", "metadata": "root.TestWindowsUtils.test_set_static_network_config", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 711 }, { "content": " def test_set_static_network_config_query_fail(self):\n self._test_set_static_network_config(adapter=False)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_query_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 719 }, { "content": " def test_set_static_network_config_cannot_set_ip(self):\n ret_val1 = (2,)\n self._test_set_static_network_config(static_val=ret_val1)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_cannot_set_ip", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 722 }, { "content": " def test_set_static_network_config_cannot_set_gateway(self):\n ret_val1 = (1,)\n ret_val2 = (2,)\n self._test_set_static_network_config(static_val=ret_val1,\n gateway_val=ret_val2)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_cannot_set_gateway", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 726 }, { "content": " def test_set_static_network_config_cannot_set_DNS(self):\n ret_val1 = (1,)\n ret_val2 = (1,)\n ret_val3 = (2,)\n self._test_set_static_network_config(static_val=ret_val1,\n gateway_val=ret_val2,\n dns_val=ret_val3)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_cannot_set_DNS", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 732 }, { "content": " def test_set_static_network_config_no_reboot(self):\n ret_val1 = (0,)\n ret_val2 = (0,)\n ret_val3 = (0,)\n self._test_set_static_network_config(static_val=ret_val1,\n gateway_val=ret_val2,\n dns_val=ret_val3)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_no_reboot", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 740 }, { "content": " def test_set_static_network_config_v6(self):\n self._test_set_static_network_config_v6()", "metadata": "root.TestWindowsUtils.test_set_static_network_config_v6", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 748 }, { "content": " def test_set_static_network_config_v6_no_adapters(self):\n self._test_set_static_network_config_v6(v6adapters=False)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_v6_no_adapters", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 751 }, { "content": " def test_set_static_network_config_v6_error(self):\n self._test_set_static_network_config_v6(v6error=True)", "metadata": "root.TestWindowsUtils.test_set_static_network_config_v6_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 754 }, { "content": " def _test_get_config_key_name(self, section):\n response = self._winutils._get_config_key_name(section)\n if section:\n self.assertEqual(self._winutils._config_key + section + '\\\\',\n response)\n else:\n self.assertEqual(self._winutils._config_key, response)", "metadata": "root.TestWindowsUtils._test_get_config_key_name", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 757 }, { "content": " def test_get_config_key_name_with_section(self):\n self._test_get_config_key_name(self._SECTION)", "metadata": "root.TestWindowsUtils.test_get_config_key_name_with_section", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 765 }, { "content": " def test_get_config_key_name_no_section(self):\n self._test_get_config_key_name(None)", "metadata": "root.TestWindowsUtils.test_get_config_key_name_no_section", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 768 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_config_key_name')\n def _test_set_config_value(self, value, mock_get_config_key_name):\n key_name = (self._winutils._config_key + self._SECTION + '\\\\' +\n self._CONFIG_NAME)\n mock_get_config_key_name.return_value = key_name\n\n self._winutils.set_config_value(self._CONFIG_NAME, value,\n self._SECTION)\n\n key = self._winreg_mock.CreateKey.return_value.__enter__.return_value\n\n self._winreg_mock.CreateKey.assert_called_with(\n self._winreg_mock.HKEY_LOCAL_MACHINE, key_name)\n mock_get_config_key_name.assert_called_with(self._SECTION)\n\n if type(value) == int:\n self._winreg_mock.SetValueEx.assert_called_with(\n key, self._CONFIG_NAME, 0, self._winreg_mock.REG_DWORD, value)\n\n else:\n self._winreg_mock.SetValueEx.assert_called_with(\n key, self._CONFIG_NAME, 0, self._winreg_mock.REG_SZ, value)", "metadata": "root.TestWindowsUtils._test_set_config_value", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 771 }, { "content": " def test_set_config_value_int(self):\n self._test_set_config_value(1)", "metadata": "root.TestWindowsUtils.test_set_config_value_int", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 795 }, { "content": " def test_set_config_value_not_int(self):\n self._test_set_config_value('1')", "metadata": "root.TestWindowsUtils.test_set_config_value_not_int", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 798 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_config_key_name')\n def _test_get_config_value(self, value, mock_get_config_key_name):\n key_name = self._winutils._config_key + self._SECTION + '\\\\'\n key_name += self._CONFIG_NAME\n\n if type(value) == int:\n regtype = self._winreg_mock.REG_DWORD\n else:\n regtype = self._winreg_mock.REG_SZ\n\n self._winreg_mock.QueryValueEx.return_value = (value, regtype)\n\n if value is None:\n mock_get_config_key_name.side_effect = [\n self.windows_utils.WindowsError]\n response = self._winutils.get_config_value(self._CONFIG_NAME,\n self._SECTION)\n self.assertEqual(None, response)\n\n else:\n mock_get_config_key_name.return_value = key_name\n\n response = self._winutils.get_config_value(self._CONFIG_NAME,\n self._SECTION)\n\n self._winreg_mock.OpenKey.assert_called_with(\n self._winreg_mock.HKEY_LOCAL_MACHINE, key_name)\n mock_get_config_key_name.assert_called_with(self._SECTION)\n self._winreg_mock.QueryValueEx.assert_called_with(\n self._winreg_mock.OpenKey().__enter__(), self._CONFIG_NAME)\n self.assertEqual(value, response)", "metadata": "root.TestWindowsUtils._test_get_config_value", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 801 }, { "content": " def test_get_config_value_type_int(self):\n self._test_get_config_value(1)", "metadata": "root.TestWindowsUtils.test_get_config_value_type_int", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 834 }, { "content": " def test_get_config_value_type_str(self):\n self._test_get_config_value('fake')", "metadata": "root.TestWindowsUtils.test_get_config_value_type_str", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 837 }, { "content": " def test_get_config_value_type_error(self):\n self._test_get_config_value(None)", "metadata": "root.TestWindowsUtils.test_get_config_value_type_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 840 }, { "content": " @mock.patch('time.sleep')\n def _test_wait_for_boot_completion(self, _, ret_vals=None):\n self._winreg_mock.QueryValueEx.side_effect = ret_vals\n\n with self.snatcher:\n self._winutils.wait_for_boot_completion()\n\n key = self._winreg_mock.OpenKey.return_value.__enter__.return_value\n self._winreg_mock.OpenKey.assert_called_with(\n self._winreg_mock.HKEY_LOCAL_MACHINE,\n \"SYSTEM\\\\Setup\\\\Status\\\\SysprepStatus\", 0,\n self._winreg_mock.KEY_READ)\n\n expected_log = []\n for gen_states in ret_vals:\n gen_state = gen_states[0]\n if gen_state == 7:\n break\n expected_log.append('Waiting for sysprep completion. '\n 'GeneralizationState: %d' % gen_state)\n self._winreg_mock.QueryValueEx.assert_called_with(\n key, \"GeneralizationState\")\n self.assertEqual(expected_log, self.snatcher.output)", "metadata": "root.TestWindowsUtils._test_wait_for_boot_completion", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 843 }, { "content": " def test_wait_for_boot_completion(self):\n ret_vals = [[7]]\n self._test_wait_for_boot_completion(ret_vals=ret_vals)", "metadata": "root.TestWindowsUtils.test_wait_for_boot_completion", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 867 }, { "content": " def test_wait_for_boot_completion_wait(self):\n ret_vals = [[1], [7]]\n self._test_wait_for_boot_completion(ret_vals=ret_vals)", "metadata": "root.TestWindowsUtils.test_wait_for_boot_completion_wait", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 871 }, { "content": " def test_get_service(self):\n conn = self._wmi_mock.WMI\n conn.return_value.Win32_Service.return_value = ['fake name']\n\n response = self._winutils._get_service('fake name')\n\n conn.assert_called_with(moniker='//./root/cimv2')\n conn.return_value.Win32_Service.assert_called_with(Name='fake name')\n self.assertEqual('fake name', response)", "metadata": "root.TestWindowsUtils.test_get_service", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 875 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_service')\n def test_check_service_exists(self, mock_get_service):\n mock_get_service.return_value = 'not None'\n\n response = self._winutils.check_service_exists('fake name')\n\n self.assertTrue(response)", "metadata": "root.TestWindowsUtils.test_check_service_exists", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 885 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_service')\n def test_get_service_status(self, mock_get_service):\n mock_service = mock.MagicMock()\n mock_get_service.return_value = mock_service\n\n response = self._winutils.get_service_status('fake name')\n\n self.assertEqual(mock_service.State, response)", "metadata": "root.TestWindowsUtils.test_get_service_status", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 894 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_service')\n def test_get_service_start_mode(self, mock_get_service):\n mock_service = mock.MagicMock()\n mock_get_service.return_value = mock_service\n\n response = self._winutils.get_service_start_mode('fake name')\n\n self.assertEqual(mock_service.StartMode, response)", "metadata": "root.TestWindowsUtils.test_get_service_start_mode", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 904 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_service')\n def _test_set_service_start_mode(self, mock_get_service, ret_val):\n mock_service = mock.MagicMock()\n mock_get_service.return_value = mock_service\n mock_service.ChangeStartMode.return_value = (ret_val,)\n\n if ret_val != 0:\n self.assertRaises(exception.CloudbaseInitException,\n self._winutils.set_service_start_mode,\n 'fake name', 'fake mode')\n else:\n self._winutils.set_service_start_mode('fake name', 'fake mode')\n\n mock_service.ChangeStartMode.assert_called_once_with('fake mode')", "metadata": "root.TestWindowsUtils._test_set_service_start_mode", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 914 }, { "content": " def test_set_service_start_mode(self):\n self._test_set_service_start_mode(ret_val=0)", "metadata": "root.TestWindowsUtils.test_set_service_start_mode", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 930 }, { "content": " def test_set_service_start_mode_exception(self):\n self._test_set_service_start_mode(ret_val=1)", "metadata": "root.TestWindowsUtils.test_set_service_start_mode_exception", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 933 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_service')\n def _test_start_service(self, mock_get_service, ret_val):\n mock_service = mock.MagicMock()\n mock_get_service.return_value = mock_service\n mock_service.StartService.return_value = (ret_val,)\n\n if ret_val != 0:\n self.assertRaises(exception.CloudbaseInitException,\n self._winutils.start_service,\n 'fake name')\n else:\n with self.snatcher:\n self._winutils.start_service('fake name')\n self.assertEqual([\"Starting service fake name\"],\n self.snatcher.output)\n\n mock_service.StartService.assert_called_once_with()", "metadata": "root.TestWindowsUtils._test_start_service", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 936 }, { "content": " def test_start_service(self):\n self._test_set_service_start_mode(ret_val=0)", "metadata": "root.TestWindowsUtils.test_start_service", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 955 }, { "content": " def test_start_service_exception(self):\n self._test_set_service_start_mode(ret_val=1)", "metadata": "root.TestWindowsUtils.test_start_service_exception", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 958 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_service')\n def _test_stop_service(self, mock_get_service, ret_val):\n mock_service = mock.MagicMock()\n mock_get_service.return_value = mock_service\n mock_service.StopService.return_value = (ret_val,)\n\n if ret_val != 0:\n self.assertRaises(exception.CloudbaseInitException,\n self._winutils.stop_service,\n 'fake name')\n else:\n with self.snatcher:\n self._winutils.stop_service('fake name')\n self.assertEqual([\"Stopping service fake name\"],\n self.snatcher.output)\n\n mock_service.StopService.assert_called_once_with()", "metadata": "root.TestWindowsUtils._test_stop_service", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 961 }, { "content": " def test_stop_service(self):\n self._test_stop_service(ret_val=0)", "metadata": "root.TestWindowsUtils.test_stop_service", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 980 }, { "content": " def test_stop_service_exception(self):\n self._test_stop_service(ret_val=1)", "metadata": "root.TestWindowsUtils.test_stop_service_exception", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 983 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.stop_service')\n @mock.patch('time.sleep')\n def test_terminate(self, mock_sleep, mock_stop_service):\n self._winutils.terminate()\n mock_stop_service.assert_called_with(self._winutils._service_name)\n mock_sleep.assert_called_with(3)", "metadata": "root.TestWindowsUtils.test_terminate", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 986 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_ipv4_routing_table')\n def _test_get_default_gateway(self, mock_get_ipv4_routing_table,\n routing_table):\n mock_get_ipv4_routing_table.return_value = [routing_table]\n response = self._winutils.get_default_gateway()\n mock_get_ipv4_routing_table.assert_called_once_with()\n if routing_table[0] == '0.0.0.0':\n self.assertEqual((routing_table[3], routing_table[2]), response)\n else:\n self.assertEqual((None, None), response)", "metadata": "root.TestWindowsUtils._test_get_default_gateway", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 994 }, { "content": " def test_get_default_gateway(self):\n routing_table = ['0.0.0.0', '1.1.1.1', self._GATEWAY, '8.8.8.8']\n self._test_get_default_gateway(routing_table=routing_table)", "metadata": "root.TestWindowsUtils.test_get_default_gateway", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1006 }, { "content": " def test_get_default_gateway_error(self):\n routing_table = ['1.1.1.1', '1.1.1.1', self._GATEWAY, '8.8.8.8']\n self._test_get_default_gateway(routing_table=routing_table)", "metadata": "root.TestWindowsUtils.test_get_default_gateway_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1010 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_ipv4_routing_table')\n def _test_check_static_route_exists(self, mock_get_ipv4_routing_table,\n routing_table):\n mock_get_ipv4_routing_table.return_value = [routing_table]\n\n response = self._winutils.check_static_route_exists(self._DESTINATION)\n\n mock_get_ipv4_routing_table.assert_called_once_with()\n if routing_table[0] == self._DESTINATION:\n self.assertTrue(response)\n else:\n self.assertFalse(response)", "metadata": "root.TestWindowsUtils._test_check_static_route_exists", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1014 }, { "content": " def test_check_static_route_exists_true(self):\n routing_table = [self._DESTINATION, '1.1.1.1', self._GATEWAY,\n '8.8.8.8']\n self._test_check_static_route_exists(routing_table=routing_table)", "metadata": "root.TestWindowsUtils.test_check_static_route_exists_true", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1028 }, { "content": " def test_check_static_route_exists_false(self):\n routing_table = ['0.0.0.0', '1.1.1.1', self._GATEWAY, '8.8.8.8']\n self._test_check_static_route_exists(routing_table=routing_table)", "metadata": "root.TestWindowsUtils.test_check_static_route_exists_false", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1033 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils.execute_process')\n def _test_add_static_route(self, mock_execute_process, err):\n next_hop = '10.10.10.10'\n interface_index = 1\n metric = 9\n args = ['ROUTE', 'ADD', self._DESTINATION, 'MASK', self._NETMASK,\n next_hop]\n mock_execute_process.return_value = (None, err, None)\n\n if err:\n self.assertRaises(exception.CloudbaseInitException,\n self._winutils.add_static_route,\n self._DESTINATION, self._NETMASK, next_hop,\n interface_index, metric)\n\n else:\n self._winutils.add_static_route(self._DESTINATION, self._NETMASK,\n next_hop, interface_index, metric)\n mock_execute_process.assert_called_with(args)", "metadata": "root.TestWindowsUtils._test_add_static_route", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1037 }, { "content": " def test_add_static_route(self):\n self._test_add_static_route(err=404)", "metadata": "root.TestWindowsUtils.test_add_static_route", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1057 }, { "content": " def test_add_static_route_fail(self):\n self._test_add_static_route(err=None)", "metadata": "root.TestWindowsUtils.test_add_static_route_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1060 }, { "content": " def _test_check_os_version(self, ret_val=None, fail=False):\n params = (3, 1, 2)\n mock_version_info = self._ntdll.RtlVerifyVersionInfo\n mock_version_info.return_value = ret_val\n mask = mock.Mock()\n mock_condition_mask = self._kernel32.VerSetConditionMask\n mock_condition_mask.return_value = mask\n ver_constants = [\n self.windows_utils.VER_MAJORVERSION,\n self.windows_utils.VER_MINORVERSION,\n self.windows_utils.VER_BUILDNUMBER]\n\n if fail:\n with self.assertRaises(exception.CloudbaseInitException):\n self._winutils.check_os_version(*params)\n return\n\n osversion_struct = self.windows_utils.Win32_OSVERSIONINFOEX_W\n osversion_struct.return_value = osversion_struct()\n osversion_struct.side_effect = None\n vi = osversion_struct()\n mask_calls = [\n mock.call(0, ver_constants[0],\n self.windows_utils.VER_GREATER_EQUAL),\n mock.call(mask, ver_constants[1],\n self.windows_utils.VER_GREATER_EQUAL),\n mock.call(mask, ver_constants[2],\n self.windows_utils.VER_GREATER_EQUAL)]\n\n response = self._winutils.check_os_version(*params)\n self._ctypes_mock.sizeof.assert_called_once_with(osversion_struct)\n mock_condition_mask.assert_has_calls(mask_calls)\n type_mask = ver_constants[0] | ver_constants[1] | ver_constants[2]\n self._ctypes_mock.byref.assert_called_once_with(vi)\n mock_version_info.assert_called_once_with(\n self._ctypes_mock.byref.return_value, type_mask, mask)\n\n expect = None\n if not ret_val:\n expect = True\n elif ret_val == self._winutils.STATUS_REVISION_MISMATCH:\n expect = False\n self.assertEqual(expect, response)", "metadata": "root.TestWindowsUtils._test_check_os_version", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1063 }, { "content": " def test_check_os_version_pass(self):\n self._test_check_os_version(ret_val=0)", "metadata": "root.TestWindowsUtils.test_check_os_version_pass", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1107 }, { "content": " def test_check_os_version_no_pass(self):\n self._test_check_os_version(\n ret_val=self._winutils.STATUS_REVISION_MISMATCH)", "metadata": "root.TestWindowsUtils.test_check_os_version_no_pass", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1110 }, { "content": " def test_check_os_version_fail(self):\n self._test_check_os_version(ret_val=mock.Mock(), fail=True)", "metadata": "root.TestWindowsUtils.test_check_os_version_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1114 }, { "content": " def _test_get_volume_label(self, ret_val):\n label = mock.MagicMock()\n max_label_size = 261\n drive = 'Fake_drive'\n self._ctypes_mock.create_unicode_buffer.return_value = label\n self._windll_mock.kernel32.GetVolumeInformationW.return_value = ret_val\n\n response = self._winutils.get_volume_label(drive)\n\n if ret_val:\n self.assertTrue(response is not None)\n else:\n self.assertTrue(response is None)\n\n self._ctypes_mock.create_unicode_buffer.assert_called_with(\n max_label_size)\n self._windll_mock.kernel32.GetVolumeInformationW.assert_called_with(\n drive, label, max_label_size, 0, 0, 0, 0, 0)", "metadata": "root.TestWindowsUtils._test_get_volume_label", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1117 }, { "content": " def test_get_volume_label(self):\n self._test_get_volume_label('ret')", "metadata": "root.TestWindowsUtils.test_get_volume_label", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1136 }, { "content": " def test_get_volume_label_no_return_value(self):\n self._test_get_volume_label(None)", "metadata": "root.TestWindowsUtils.test_get_volume_label_no_return_value", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1139 }, { "content": " @mock.patch('re.search')\n @mock.patch('cloudbaseinit.osutils.base.BaseOSUtils.'\n 'generate_random_password')\n def test_generate_random_password(self, mock_generate_random_password,\n mock_search):\n length = 14\n mock_search.return_value = True\n mock_generate_random_password.return_value = 'Passw0rd'\n\n response = self._winutils.generate_random_password(length)\n\n mock_generate_random_password.assert_called_once_with(length)\n self.assertEqual('Passw0rd', response)", "metadata": "root.TestWindowsUtils.test_generate_random_password", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1142 }, { "content": " def _test_get_logical_drives(self, buf_length, last_error=None):\n mock_buf = mock.MagicMock()\n mock_buf.__getitem__.side_effect = ['1', '\\x00']\n mock_get_drives = self._windll_mock.kernel32.GetLogicalDriveStringsW\n\n self._ctypes_mock.create_unicode_buffer.return_value = mock_buf\n mock_get_drives.return_value = buf_length\n\n if buf_length is None:\n with self.assert_raises_windows_message(\n \"GetLogicalDriveStringsW failed: %r\", last_error):\n self._winutils._get_logical_drives()\n else:\n response = self._winutils._get_logical_drives()\n\n self._ctypes_mock.create_unicode_buffer.assert_called_with(261)\n mock_get_drives.assert_called_with(260, mock_buf)\n self.assertEqual(['1'], response)", "metadata": "root.TestWindowsUtils._test_get_logical_drives", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1156 }, { "content": " def test_get_logical_drives_exception(self):\n self._test_get_logical_drives(buf_length=None, last_error=100)", "metadata": "root.TestWindowsUtils.test_get_logical_drives_exception", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1175 }, { "content": " def test_get_logical_drives(self):\n self._test_get_logical_drives(buf_length=2)", "metadata": "root.TestWindowsUtils.test_get_logical_drives", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1178 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils.'\n '_get_logical_drives')\n @mock.patch('cloudbaseinit.osutils.windows.kernel32')\n def test_get_cdrom_drives(self, mock_kernel32, mock_get_logical_drives):\n mock_get_logical_drives.return_value = ['drive']\n mock_kernel32.GetDriveTypeW.return_value = self._winutils.DRIVE_CDROM\n\n response = self._winutils.get_cdrom_drives()\n\n mock_get_logical_drives.assert_called_with()\n self.assertEqual(['drive'], response)", "metadata": "root.TestWindowsUtils.test_get_cdrom_drives", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1181 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.msvcrt')\n @mock.patch('cloudbaseinit.osutils.windows.kernel32')\n @mock.patch('cloudbaseinit.osutils.windows.setupapi')\n @mock.patch('cloudbaseinit.osutils.windows.Win32_STORAGE_DEVICE_NUMBER')\n def _test_get_physical_disks(self, mock_sdn, mock_setupapi, mock_kernel32,\n mock_msvcrt, handle_disks, last_error,\n interface_detail, disk_handle, io_control,\n last_error_code=None):\n\n sizeof_calls = [\n mock.call(\n self.windows_utils.Win32_SP_DEVICE_INTERFACE_DATA\n ),\n mock.call(\n self.windows_utils.Win32_SP_DEVICE_INTERFACE_DETAIL_DATA_W\n ),\n mock.call(mock_sdn())\n ]\n device_interfaces_calls = [\n mock.call(\n handle_disks, None, self._ctypes_mock.byref.return_value, 0,\n self._ctypes_mock.byref.return_value),\n mock.call(handle_disks, None,\n self._ctypes_mock.byref.return_value, 1,\n self._ctypes_mock.byref.return_value)]\n device_path = self._ctypes_mock.cast.return_value.contents.DevicePath\n cast_calls = [mock.call(mock_msvcrt.malloc(),\n self._ctypes_mock.POINTER.return_value),\n mock.call(device_path,\n self._wintypes_mock.LPWSTR)]\n\n mock_setup_interface = mock_setupapi.SetupDiGetDeviceInterfaceDetailW\n\n mock_setupapi.SetupDiGetClassDevsW.return_value = handle_disks\n mock_kernel32.GetLastError.return_value = last_error\n mock_setup_interface.return_value = interface_detail\n mock_kernel32.CreateFileW.return_value = disk_handle\n mock_kernel32.DeviceIoControl.return_value = io_control\n\n mock_setupapi.SetupDiEnumDeviceInterfaces.side_effect = [True, False]\n\n if handle_disks == self._winutils.INVALID_HANDLE_VALUE or (\n last_error != self._winutils.ERROR_INSUFFICIENT_BUFFER) and not (\n interface_detail) or (\n disk_handle == self._winutils.INVALID_HANDLE_VALUE) or (\n not io_control):\n if not io_control:\n with self.assert_raises_windows_message(\n \"DeviceIoControl failed: %r\", last_error_code):\n self._winutils.get_physical_disks()\n elif not interface_detail:\n with self.assert_raises_windows_message(\n \"SetupDiGetDeviceInterfaceDetailW failed: %r\",\n last_error_code):\n self._winutils.get_physical_disks()\n else:\n self.assertRaises(exception.CloudbaseInitException,\n self._winutils.get_physical_disks)\n\n else:\n response = self._winutils.get_physical_disks()\n\n self.assertEqual(sizeof_calls,\n self._ctypes_mock.sizeof.call_args_list)\n\n self.assertEqual(\n device_interfaces_calls,\n mock_setupapi.SetupDiEnumDeviceInterfaces.call_args_list)\n\n if not interface_detail:\n mock_kernel32.GetLastError.assert_called_once_with()\n\n self._ctypes_mock.POINTER.assert_called_with(\n self.windows_utils.Win32_SP_DEVICE_INTERFACE_DETAIL_DATA_W)\n mock_msvcrt.malloc.assert_called_with(\n self._ctypes_mock.c_size_t.return_value\n )\n\n self.assertEqual(cast_calls, self._ctypes_mock.cast.call_args_list)\n\n mock_setup_interface.assert_called_with(\n handle_disks, self._ctypes_mock.byref.return_value,\n self._ctypes_mock.cast.return_value,\n self._wintypes_mock.DWORD.return_value,\n None, None)\n\n mock_kernel32.CreateFileW.assert_called_with(\n self._ctypes_mock.cast.return_value.value, 0,\n self._winutils.FILE_SHARE_READ, None,\n self._winutils.OPEN_EXISTING, 0, 0)\n mock_sdn.assert_called_with()\n\n mock_kernel32.DeviceIoControl.assert_called_with(\n disk_handle, self._winutils.IOCTL_STORAGE_GET_DEVICE_NUMBER,\n None, 0, self._ctypes_mock.byref.return_value,\n self._ctypes_mock.sizeof.return_value,\n self._ctypes_mock.byref.return_value, None)\n\n self.assertEqual([\"\\\\\\\\.\\PHYSICALDRIVE1\"], response)\n\n mock_setupapi.SetupDiDestroyDeviceInfoList.assert_called_once_with(\n handle_disks)\n\n mock_setupapi.SetupDiGetClassDevsW.assert_called_once_with(\n self._ctypes_mock.byref.return_value, None, None,\n self._winutils.DIGCF_PRESENT |\n self._winutils.DIGCF_DEVICEINTERFACE)", "metadata": "root.TestWindowsUtils._test_get_physical_disks", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1193 }, { "content": " def test_get_physical_disks(self):\n mock_handle_disks = mock.MagicMock()\n mock_disk_handle = mock.MagicMock()\n self._test_get_physical_disks(\n handle_disks=mock_handle_disks,\n last_error=self._winutils.ERROR_INSUFFICIENT_BUFFER,\n interface_detail='fake interface detail',\n disk_handle=mock_disk_handle, io_control=True)", "metadata": "root.TestWindowsUtils.test_get_physical_disks", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1301 }, { "content": " def test_get_physical_disks_other_error_and_no_interface_detail(self):\n mock_handle_disks = mock.MagicMock()\n mock_disk_handle = mock.MagicMock()\n self._test_get_physical_disks(\n handle_disks=mock_handle_disks,\n last_error='other', interface_detail=None,\n last_error_code=100,\n disk_handle=mock_disk_handle, io_control=True)", "metadata": "root.TestWindowsUtils.test_get_physical_disks_other_error_and_no_interface_detail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1310 }, { "content": " def test_get_physical_disks_invalid_disk_handle(self):\n mock_handle_disks = mock.MagicMock()\n self._test_get_physical_disks(\n handle_disks=mock_handle_disks,\n last_error=self._winutils.ERROR_INSUFFICIENT_BUFFER,\n interface_detail='fake interface detail',\n disk_handle=self._winutils.INVALID_HANDLE_VALUE, io_control=True)", "metadata": "root.TestWindowsUtils.test_get_physical_disks_invalid_disk_handle", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1319 }, { "content": " def test_get_physical_disks_io_control(self):\n mock_handle_disks = mock.MagicMock()\n mock_disk_handle = mock.MagicMock()\n self._test_get_physical_disks(\n handle_disks=mock_handle_disks,\n last_error=self._winutils.ERROR_INSUFFICIENT_BUFFER,\n interface_detail='fake interface detail',\n last_error_code=100,\n disk_handle=mock_disk_handle, io_control=False)", "metadata": "root.TestWindowsUtils.test_get_physical_disks_io_control", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1327 }, { "content": " def test_get_physical_disks_handle_disks_invalid(self):\n mock_disk_handle = mock.MagicMock()\n self._test_get_physical_disks(\n handle_disks=self._winutils.INVALID_HANDLE_VALUE,\n last_error=self._winutils.ERROR_INSUFFICIENT_BUFFER,\n interface_detail='fake interface detail',\n disk_handle=mock_disk_handle, io_control=True)", "metadata": "root.TestWindowsUtils.test_get_physical_disks_handle_disks_invalid", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1337 }, { "content": " def _test_get_volumes(self, find_first=True, find_next=True):\n count = 3\n expected_volumes = [\"ID_{}\".format(idx) for idx in range(count)]\n\n volume_values = mock.PropertyMock(side_effect=expected_volumes)\n mock_volume = mock.Mock()\n type(mock_volume).value = volume_values\n self._ctypes_mock.create_unicode_buffer.return_value = mock_volume\n\n if not find_first:\n self._kernel32.FindFirstVolumeW.return_value = self._winutils\\\n .INVALID_HANDLE_VALUE\n side_effects = [1] * (count - 1)\n side_effects.append(0)\n self._kernel32.FindNextVolumeW.side_effect = side_effects\n if find_next:\n self._ctypes_mock.GetLastError.return_value = self._winutils\\\n .ERROR_NO_MORE_FILES\n if not (find_first and find_next):\n with self.assertRaises(exception.WindowsCloudbaseInitException):\n self._winutils.get_volumes()\n return\n\n volumes = self._winutils.get_volumes()\n self._kernel32.FindFirstVolumeW.assert_called_once_with(\n mock_volume, self._winutils.MAX_PATH)\n find_next_calls = [\n mock.call(self._kernel32.FindFirstVolumeW.return_value,\n mock_volume, self._winutils.MAX_PATH)] * count\n self._kernel32.FindNextVolumeW.assert_has_calls(find_next_calls)\n self._kernel32.FindVolumeClose.assert_called_once_with(\n self._kernel32.FindFirstVolumeW.return_value)\n self.assertEqual(expected_volumes, volumes)", "metadata": "root.TestWindowsUtils._test_get_volumes", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1345 }, { "content": " def test_get_volumes(self):\n self._test_get_volumes()", "metadata": "root.TestWindowsUtils.test_get_volumes", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1379 }, { "content": " def test_get_volumes_first_fail(self):\n self._test_get_volumes(find_first=False)", "metadata": "root.TestWindowsUtils.test_get_volumes_first_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1382 }, { "content": " def test_get_volumes_next_fail(self):\n self._test_get_volumes(find_next=False)", "metadata": "root.TestWindowsUtils.test_get_volumes_next_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1385 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils._get_fw_protocol')\n def test_firewall_create_rule(self, mock_get_fw_protocol):\n expected = [mock.call(\"HNetCfg.FWOpenPort\"),\n mock.call(\"HNetCfg.FwMgr\")]\n\n self._winutils.firewall_create_rule(\n name='fake name', port=9999, protocol=self._winutils.PROTOCOL_TCP)\n\n self.assertEqual(expected, self._client_mock.Dispatch.call_args_list)\n mock_get_fw_protocol.assert_called_once_with(\n self._winutils.PROTOCOL_TCP)", "metadata": "root.TestWindowsUtils.test_firewall_create_rule", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1388 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils._get_fw_protocol')\n def test_firewall_remove_rule(self, mock_get_fw_protocol):\n self._winutils.firewall_remove_rule(\n name='fake name', port=9999, protocol=self._winutils.PROTOCOL_TCP)\n\n self._client_mock.Dispatch.assert_called_once_with(\"HNetCfg.FwMgr\")\n mock_get_fw_protocol.assert_called_once_with(\n self._winutils.PROTOCOL_TCP)", "metadata": "root.TestWindowsUtils.test_firewall_remove_rule", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1400 }, { "content": " @mock.patch('os.path.expandvars')\n def test_get_system32_dir(self, mock_expandvars):\n path = \"system32\"\n mock_expandvars.return_value = path\n response = self._winutils.get_system32_dir()\n\n mock_expandvars.assert_called_once_with('%windir%\\\\{}'.format(path))\n self.assertEqual(path, response)", "metadata": "root.TestWindowsUtils.test_get_system32_dir", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1409 }, { "content": " @mock.patch('os.path.expandvars')\n def test_get_syswow64_dir(self, mock_expandvars):\n path = \"syswow64\"\n mock_expandvars.return_value = path\n response = self._winutils.get_syswow64_dir()\n\n mock_expandvars.assert_called_once_with('%windir%\\\\{}'.format(path))\n self.assertEqual(path, response)", "metadata": "root.TestWindowsUtils.test_get_syswow64_dir", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1418 }, { "content": " @mock.patch('os.path.expandvars')\n def test_get_sysnative_dir(self, mock_expandvars):\n path = \"sysnative\"\n mock_expandvars.return_value = path\n response = self._winutils.get_sysnative_dir()\n\n mock_expandvars.assert_called_once_with('%windir%\\\\{}'.format(path))\n self.assertEqual(path, response)", "metadata": "root.TestWindowsUtils.test_get_sysnative_dir", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1427 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.is_wow64')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_sysnative_dir')\n @mock.patch('os.path.isdir')\n def _test_check_sysnative_dir_exists(self, mock_isdir,\n mock_get_sysnative_dir,\n mock_is_wow64,\n exists=True, wow64=False):\n mock_get_sysnative_dir.return_value = 'fake_sysnative'\n mock_isdir.return_value = exists\n mock_is_wow64.return_value = wow64\n\n with self.snatcher:\n response = self._winutils.check_sysnative_dir_exists()\n\n expected_log = []\n if not exists and wow64:\n expected_log = ['Unable to validate sysnative folder presence. '\n 'If Target OS is Server 2003 x64, please ensure '\n 'you have KB942589 installed']\n self.assertEqual(expected_log, self.snatcher.output)\n self.assertEqual(exists, response)", "metadata": "root.TestWindowsUtils._test_check_sysnative_dir_exists", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1436 }, { "content": " def test_check_sysnative_dir_exists(self):\n self._test_check_sysnative_dir_exists()", "metadata": "root.TestWindowsUtils.test_check_sysnative_dir_exists", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1460 }, { "content": " def test_check_sysnative_dir_does_not_exist(self):\n self._test_check_sysnative_dir_exists(exists=False, wow64=True)", "metadata": "root.TestWindowsUtils.test_check_sysnative_dir_does_not_exist", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1463 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.check_sysnative_dir_exists')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_sysnative_dir')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._is_64bit_arch')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_syswow64_dir')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_system32_dir')\n def _test_get_system_dir(self, mock_get_system32_dir,\n mock_get_syswow64_dir,\n mock_is_64bit_arch,\n mock_get_sysnative_dir,\n mock_check_sysnative_dir_exists,\n sysnative, arches):\n # settings\n mock_get_system32_dir.return_value = \"system32\"\n mock_get_syswow64_dir.return_value = \"syswow64\"\n mock_get_sysnative_dir.return_value = \"sysnative\"\n mock_is_64bit_arch.return_value = arches.startswith(\"64\")\n mock_check_sysnative_dir_exists.return_value = (arches == \"32on64\")\n expect_dict = {\n \"32on32\": {\n False: (\n \"system32\",\n [mock_is_64bit_arch, mock_get_system32_dir]\n ),\n True: (\n \"system32\",\n [mock_check_sysnative_dir_exists,\n mock_get_system32_dir]\n )\n },\n \"32on64\": {\n False: (\n \"system32\",\n [mock_is_64bit_arch, mock_get_system32_dir]\n ),\n True: (\n \"sysnative\",\n [mock_check_sysnative_dir_exists,\n mock_get_sysnative_dir]\n )\n },\n \"64on64\": {\n False: (\n \"syswow64\",\n [mock_is_64bit_arch, mock_get_syswow64_dir]\n ),\n True: (\n \"system32\",\n [mock_check_sysnative_dir_exists,\n mock_get_system32_dir]\n )\n }\n }\n # actions\n response = self._winutils._get_system_dir(sysnative=sysnative)\n expect, calls = expect_dict[arches][sysnative]\n self.assertEqual(expect, response)\n for call in calls:\n call.assert_called_once_with()", "metadata": "root.TestWindowsUtils._test_get_system_dir", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1466 }, { "content": " def test_get_system_dir_32on32(self):\n arches = \"32on32\"\n self._test_get_system_dir(sysnative=False, arches=arches)\n self._test_get_system_dir(sysnative=True, arches=arches)", "metadata": "root.TestWindowsUtils.test_get_system_dir_32on32", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1530 }, { "content": " def test_get_system_dir_32on64(self):\n arches = \"32on64\"\n self._test_get_system_dir(sysnative=False, arches=arches)\n self._test_get_system_dir(sysnative=True, arches=arches)", "metadata": "root.TestWindowsUtils.test_get_system_dir_32on64", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1535 }, { "content": " def test_get_system_dir_64on64(self):\n arches = \"64on64\"\n self._test_get_system_dir(sysnative=False, arches=arches)\n self._test_get_system_dir(sysnative=True, arches=arches)", "metadata": "root.TestWindowsUtils.test_get_system_dir_64on64", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1540 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._check_server_level')\n def test_is_nano_server(self, mock_check_server_level):\n expect = mock.Mock()\n mock_check_server_level.return_value = expect\n response = self._winutils.is_nano_server()\n mock_check_server_level.assert_called_once_with(\"NanoServer\")\n self.assertEqual(expect, response)", "metadata": "root.TestWindowsUtils.test_is_nano_server", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1545 }, { "content": " def _test_check_server_level(self, fail=False, success=True):\n server_level = mock.Mock()\n open_key = self._winreg_mock.OpenKey\n\n if not success:\n eclass = Exception\n error = eclass()\n self.windows_utils.WindowsError = eclass\n open_key.side_effect = [error]\n if fail:\n with self.assertRaises(eclass):\n self._winutils._check_server_level(server_level)\n return\n error.winerror = 2\n response = self._winutils._check_server_level(server_level)\n self.assertEqual(False, response)\n return\n\n self.used_hive, self.used_path = None, None\n mock_key = mock.Mock()\n\n @contextlib.contextmanager\n def open_key_context(hive, path):\n self.used_hive, self.used_path = hive, path\n yield mock_key\n\n self._winreg_mock.OpenKey = open_key_context\n self._winreg_mock.QueryValueEx.return_value = [1]\n response = self._winutils._check_server_level(server_level)\n self.assertEqual(self._winreg_mock.HKEY_LOCAL_MACHINE,\n self.used_hive)\n self.assertEqual(\"Software\\\\Microsoft\\\\Windows NT\\\\\"\n \"CurrentVersion\\\\Server\\\\ServerLevels\",\n self.used_path)\n self._winreg_mock.QueryValueEx.assert_called_once_with(\n mock_key, server_level)\n self.assertEqual(True, response)", "metadata": "root.TestWindowsUtils._test_check_server_level", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1554 }, { "content": " def test_check_server_level_fail(self):\n self._test_check_server_level(fail=True, success=False)", "metadata": "root.TestWindowsUtils.test_check_server_level_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1592 }, { "content": " def test_check_server_level_no_success(self):\n self._test_check_server_level(fail=False, success=False)", "metadata": "root.TestWindowsUtils.test_check_server_level_no_success", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1595 }, { "content": " def test_check_server_level_success(self):\n self._test_check_server_level()", "metadata": "root.TestWindowsUtils.test_check_server_level_success", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1598 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.is_nano_server')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.check_sysnative_dir_exists')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_sysnative_dir')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_system32_dir')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.execute_process')\n def _test_execute_powershell_script(self, mock_execute_process,\n mock_get_system32_dir,\n mock_get_sysnative_dir,\n mock_check_sysnative_dir_exists,\n mock_is_nano_server,\n ret_val=None, nano=False):\n mock_check_sysnative_dir_exists.return_value = ret_val\n mock_is_nano_server.return_value = nano\n mock_get_sysnative_dir.return_value = 'fake'\n mock_get_system32_dir.return_value = 'fake'\n fake_path = os.path.join('fake', 'WindowsPowerShell\\\\v1.0\\\\'\n 'powershell.exe')\n args = [fake_path]\n if not nano:\n args.extend(['-ExecutionPolicy', 'RemoteSigned',\n '-NonInteractive', '-File'])\n args.append('fake_script_path')\n\n response = self._winutils.execute_powershell_script(\n script_path='fake_script_path')\n\n if ret_val:\n mock_get_sysnative_dir.assert_called_once_with()\n else:\n mock_get_system32_dir.assert_called_once_with()\n\n mock_execute_process.assert_called_with(args, shell=False)\n self.assertEqual(mock_execute_process.return_value, response)", "metadata": "root.TestWindowsUtils._test_execute_powershell_script", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1601 }, { "content": " def test_execute_powershell_script_sysnative(self):\n self._test_execute_powershell_script(ret_val=True)", "metadata": "root.TestWindowsUtils.test_execute_powershell_script_sysnative", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1640 }, { "content": " def test_execute_powershell_script_system32(self):\n self._test_execute_powershell_script(ret_val=False)", "metadata": "root.TestWindowsUtils.test_execute_powershell_script_system32", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1643 }, { "content": " def test_execute_powershell_script_sysnative_nano(self):\n self._test_execute_powershell_script(ret_val=True, nano=True)", "metadata": "root.TestWindowsUtils.test_execute_powershell_script_sysnative_nano", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1646 }, { "content": " @mock.patch('cloudbaseinit.utils.windows.network.get_adapter_addresses')\n def test_get_dhcp_hosts_in_use(self, mock_get_adapter_addresses):\n net_addr = {}\n net_addr[\"mac_address\"] = 'fake mac address'\n net_addr[\"dhcp_server\"] = 'fake dhcp server'\n net_addr[\"dhcp_enabled\"] = True\n mock_get_adapter_addresses.return_value = [net_addr]\n\n response = self._winutils.get_dhcp_hosts_in_use()\n\n mock_get_adapter_addresses.assert_called_once_with()\n self.assertEqual([('fake mac address', 'fake dhcp server')], response)", "metadata": "root.TestWindowsUtils.test_get_dhcp_hosts_in_use", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1649 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.check_sysnative_dir_exists')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_sysnative_dir')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.get_system32_dir')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.execute_process')\n def _test_set_ntp_client_config(self, mock_execute_process,\n mock_get_system32_dir,\n mock_get_sysnative_dir,\n mock_check_sysnative_dir_exists,\n sysnative, ret_val):\n fake_base_dir = 'fake_dir'\n ntp_hosts = [\"first\", \"second\"]\n\n mock_check_sysnative_dir_exists.return_value = sysnative\n mock_execute_process.return_value = (None, None, ret_val)\n w32tm_path = os.path.join(fake_base_dir, \"w32tm.exe\")\n mock_get_sysnative_dir.return_value = fake_base_dir\n mock_get_system32_dir.return_value = fake_base_dir\n\n args = [w32tm_path, '/config',\n '/manualpeerlist:%s' % \",\".join(ntp_hosts),\n '/syncfromflags:manual', '/update']\n\n if ret_val:\n self.assertRaises(exception.CloudbaseInitException,\n self._winutils.set_ntp_client_config,\n 'fake ntp host')\n\n else:\n self._winutils.set_ntp_client_config(ntp_hosts=ntp_hosts)\n\n if sysnative:\n mock_get_sysnative_dir.assert_called_once_with()\n else:\n mock_get_system32_dir.assert_called_once_with()\n\n mock_execute_process.assert_called_once_with(args, shell=False)", "metadata": "root.TestWindowsUtils._test_set_ntp_client_config", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1662 }, { "content": " def test_set_ntp_client_config_sysnative_true(self):\n self._test_set_ntp_client_config(sysnative=True, ret_val=None)", "metadata": "root.TestWindowsUtils.test_set_ntp_client_config_sysnative_true", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1703 }, { "content": " def test_set_ntp_client_config_sysnative_false(self):\n self._test_set_ntp_client_config(sysnative=False, ret_val=None)", "metadata": "root.TestWindowsUtils.test_set_ntp_client_config_sysnative_false", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1706 }, { "content": " def test_set_ntp_client_config_sysnative_exception(self):\n self._test_set_ntp_client_config(sysnative=False,\n ret_val='fake return value')", "metadata": "root.TestWindowsUtils.test_set_ntp_client_config_sysnative_exception", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1709 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.execute_process')\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '._get_system_dir')\n @mock.patch(\"cloudbaseinit.utils.windows.network.\"\n \"get_adapter_addresses\")\n @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils'\n '.check_os_version')\n def _test_set_network_adapter_mtu(self,\n mock_check_os_version,\n mock_get_adapter_addresses,\n mock_get_system_dir,\n mock_execute_process,\n fail=False, os_version_ret=True,\n mac_address_match=True,\n execute_process_val=0):\n mac_address = \"fake mac\"\n mtu = \"fake mtu\"\n base_dir = \"fake path\"\n mock_check_os_version.return_value = os_version_ret\n mock_get_adapter_addresses.return_value = [mock.MagicMock()\n for _ in range(3)]\n if mac_address_match:\n # Same as `iface_index` under the \"interface_index\" key.\n mock_get_adapter_addresses.return_value[1].\\\n __getitem__.return_value = mac_address\n mock_get_system_dir.return_value = base_dir\n mock_execute_process.return_value = [None, None, execute_process_val]\n\n if fail:\n with self.assertRaises(exception.CloudbaseInitException):\n self._winutils.set_network_adapter_mtu(mac_address, mtu)\n return\n\n with self.snatcher:\n self._winutils.set_network_adapter_mtu(mac_address, mtu)\n expected_log = ['Setting MTU for interface \"%(mac_address)s\" with '\n 'value \"%(mtu)s\"' %\n {'mac_address': mac_address, 'mtu': mtu}]\n args = [os.path.join(base_dir, \"netsh.exe\"),\n \"interface\", \"ipv4\", \"set\", \"subinterface\",\n mac_address, \"mtu=%s\" % mtu, \"store=persistent\"]\n self.assertEqual(expected_log, self.snatcher.output)\n mock_check_os_version.assert_called_once_with(6, 0)\n mock_get_adapter_addresses.assert_called_once_with()\n mock_get_system_dir.assert_called_once_with()\n mock_execute_process.assert_called_once_with(args, shell=False)", "metadata": "root.TestWindowsUtils._test_set_network_adapter_mtu", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1713 }, { "content": " def test_set_network_adapter_mtu_not_supported(self):\n self._test_set_network_adapter_mtu(fail=True, os_version_ret=False)", "metadata": "root.TestWindowsUtils.test_set_network_adapter_mtu_not_supported", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1761 }, { "content": " def test_set_network_adapter_mtu_no_mac_match(self):\n self._test_set_network_adapter_mtu(fail=True,\n mac_address_match=False)", "metadata": "root.TestWindowsUtils.test_set_network_adapter_mtu_no_mac_match", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1764 }, { "content": " def test_set_network_adapter_mtu_execute_fail(self):\n self._test_set_network_adapter_mtu(fail=True,\n execute_process_val=1)", "metadata": "root.TestWindowsUtils.test_set_network_adapter_mtu_execute_fail", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1768 }, { "content": " def test_set_network_adapter_mtu(self):\n self._test_set_network_adapter_mtu()", "metadata": "root.TestWindowsUtils.test_set_network_adapter_mtu", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1772 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils.'\n '_get_system_dir')\n @mock.patch('cloudbaseinit.osutils.base.BaseOSUtils.'\n 'execute_process')\n def test_execute_system32_process(self, mock_execute_process,\n mock_get_system_dir):\n mock_get_system_dir.return_value = 'base_dir'\n mock_execute_process.return_value = mock.sentinel.execute_process\n args = ['command', 'argument']\n\n result = self._winutils.execute_system32_process(args)\n mock_execute_process.assert_called_once_with(\n [os.path.join('base_dir', args[0])] + args[1:],\n decode_output=False,\n shell=True)\n self.assertEqual(mock.sentinel.execute_process, result)", "metadata": "root.TestWindowsUtils.test_execute_system32_process", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1775 }, { "content": " def test_get_password_maximum_length(self):\n self.assertEqual(20, self._winutils.get_maximum_password_length())", "metadata": "root.TestWindowsUtils.test_get_password_maximum_length", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1792 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.windows_tz')\n def test_set_timezone_fails(self, mock_windows_tz):\n mock_windows_tz.tz_win.get.return_value = None\n\n with self.assertRaises(exception.CloudbaseInitException) as cm:\n self._winutils.set_timezone(mock.sentinel.timezone)\n expected = (\n \"The given timezone name is unrecognised: %r\"\n % mock.sentinel.timezone\n )\n self.assertEqual(expected, str(cm.exception))\n mock_windows_tz.tz_win.get.assert_called_once_with(\n mock.sentinel.timezone)", "metadata": "root.TestWindowsUtils.test_set_timezone_fails", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1795 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.timezone')\n @mock.patch('cloudbaseinit.osutils.windows.windows_tz')\n def test_set_timezone(self, mock_windows_tz, mock_timezone):\n mock_windows_tz.tz_win.get.return_value = (\n mock.sentinel.windows_timezone)\n\n self._winutils.set_timezone(mock.sentinel.timezone)\n\n mock_windows_tz.tz_win.get.assert_called_once_with(\n mock.sentinel.timezone)\n mock_timezone.Timezone.assert_called_once_with(\n mock.sentinel.windows_timezone)\n mock_timezone.Timezone.return_value.set.assert_called_once_with(\n self._winutils)", "metadata": "root.TestWindowsUtils.test_set_timezone", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1809 }, { "content": " def _test__heap_alloc(self, fail):\n mock_heap = mock.Mock()\n mock_size = mock.Mock()\n\n if fail:\n self._kernel32.HeapAlloc.return_value = None\n\n with self.assertRaises(exception.CloudbaseInitException) as cm:\n self._winutils._heap_alloc(mock_heap, mock_size)\n\n self.assertEqual('Unable to allocate memory for the IP '\n 'forward table',\n str(cm.exception))\n else:\n result = self._winutils._heap_alloc(mock_heap, mock_size)\n self.assertEqual(self._kernel32.HeapAlloc.return_value, result)\n\n self._kernel32.HeapAlloc.assert_called_once_with(\n mock_heap, 0, self._ctypes_mock.c_size_t(mock_size.value))", "metadata": "root.TestWindowsUtils._test__heap_alloc", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1824 }, { "content": " def test__heap_alloc_error(self):\n self._test__heap_alloc(fail=True)", "metadata": "root.TestWindowsUtils.test__heap_alloc_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1844 }, { "content": " def test__heap_alloc_no_error(self):\n self._test__heap_alloc(fail=False)", "metadata": "root.TestWindowsUtils.test__heap_alloc_no_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1847 }, { "content": " def test__get_forward_table_no_memory(self):\n self._winutils._heap_alloc = mock.Mock()\n error_msg = 'Unable to allocate memory for the IP forward table'\n exc = exception.CloudbaseInitException(error_msg)\n self._winutils._heap_alloc.side_effect = exc\n\n with self.assertRaises(exception.CloudbaseInitException) as cm:\n with self._winutils._get_forward_table():\n pass\n\n self.assertEqual(error_msg, str(cm.exception))\n self._winutils._heap_alloc.assert_called_once_with(\n self._kernel32.GetProcessHeap.return_value,\n self._ctypes_mock.wintypes.ULONG.return_value)", "metadata": "root.TestWindowsUtils.test__get_forward_table_no_memory", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1850 }, { "content": " def test__get_forward_table_insufficient_buffer_no_memory(self):\n self._kernel32.HeapAlloc.side_effect = (mock.sentinel.table_mem, None)\n self._iphlpapi.GetIpForwardTable.return_value = (\n self._winutils.ERROR_INSUFFICIENT_BUFFER)\n\n with self.assertRaises(exception.CloudbaseInitException):\n with self._winutils._get_forward_table():\n pass\n\n table = self._ctypes_mock.cast.return_value\n self._iphlpapi.GetIpForwardTable.assert_called_once_with(\n table,\n self._ctypes_mock.byref.return_value, 0)\n heap_calls = [\n mock.call(self._kernel32.GetProcessHeap.return_value, 0, table),\n mock.call(self._kernel32.GetProcessHeap.return_value, 0, table)\n ]\n self.assertEqual(heap_calls, self._kernel32.HeapFree.mock_calls)", "metadata": "root.TestWindowsUtils.test__get_forward_table_insufficient_buffer_no_memory", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1865 }, { "content": " def _test__get_forward_table(self, reallocation=False,\n insufficient_buffer=False,\n fail=False):\n if fail:\n with self.assertRaises(exception.CloudbaseInitException) as cm:\n with self._winutils._get_forward_table():\n pass\n\n msg = ('Unable to get IP forward table. Error: %s'\n % mock.sentinel.error)\n self.assertEqual(msg, str(cm.exception))\n else:\n with self._winutils._get_forward_table() as table:\n pass\n pointer = self._ctypes_mock.POINTER(\n self._iphlpapi.Win32_MIB_IPFORWARDTABLE)\n expected_forward_table = self._ctypes_mock.cast(\n self._kernel32.HeapAlloc.return_value, pointer)\n self.assertEqual(expected_forward_table, table)\n\n heap_calls = [\n mock.call(self._kernel32.GetProcessHeap.return_value, 0,\n self._ctypes_mock.cast.return_value)\n ]\n forward_calls = [\n mock.call(self._ctypes_mock.cast.return_value,\n self._ctypes_mock.byref.return_value, 0),\n ]\n if insufficient_buffer:\n # We expect two calls for GetIpForwardTable\n forward_calls.append(forward_calls[0])\n if reallocation:\n heap_calls.append(heap_calls[0])\n self.assertEqual(heap_calls, self._kernel32.HeapFree.mock_calls)\n self.assertEqual(forward_calls,\n self._iphlpapi.GetIpForwardTable.mock_calls)", "metadata": "root.TestWindowsUtils._test__get_forward_table", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1884 }, { "content": " def test__get_forward_table_sufficient_buffer(self):\n self._iphlpapi.GetIpForwardTable.return_value = None\n self._test__get_forward_table()", "metadata": "root.TestWindowsUtils.test__get_forward_table_sufficient_buffer", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1921 }, { "content": " def test__get_forward_table_insufficient_buffer_reallocate(self):\n self._kernel32.HeapAlloc.side_effect = (\n mock.sentinel.table_mem, mock.sentinel.table_mem)\n self._iphlpapi.GetIpForwardTable.side_effect = (\n self._winutils.ERROR_INSUFFICIENT_BUFFER, None)\n\n self._test__get_forward_table(reallocation=True,\n insufficient_buffer=True)", "metadata": "root.TestWindowsUtils.test__get_forward_table_insufficient_buffer_reallocate", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1925 }, { "content": " def test__get_forward_table_insufficient_buffer_other_error(self):\n self._kernel32.HeapAlloc.side_effect = (\n mock.sentinel.table_mem, mock.sentinel.table_mem)\n self._iphlpapi.GetIpForwardTable.side_effect = (\n self._winutils.ERROR_INSUFFICIENT_BUFFER, mock.sentinel.error)\n\n self._test__get_forward_table(reallocation=True,\n insufficient_buffer=True,\n fail=True)", "metadata": "root.TestWindowsUtils.test__get_forward_table_insufficient_buffer_other_error", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1934 }, { "content": " @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils.'\n '_get_forward_table')\n def test_routes(self, mock_forward_table):\n def _same(arg):\n return arg._mock_name.encode()\n\n route = mock.MagicMock()\n mock_cast_result = mock.Mock()\n mock_cast_result.contents = [route]\n self._ctypes_mock.cast.return_value = mock_cast_result\n self.windows_utils.Ws2_32.inet_ntoa.side_effect = _same\n route.dwForwardIfIndex = 'dwForwardIfIndex'\n route.dwForwardProto = 'dwForwardProto'\n route.dwForwardMetric1 = 'dwForwardMetric1'\n routes = self._winutils._get_ipv4_routing_table()\n\n mock_forward_table.assert_called_once_with()\n enter = mock_forward_table.return_value.__enter__\n enter.assert_called_once_with()\n exit_ = mock_forward_table.return_value.__exit__\n exit_.assert_called_once_with(None, None, None)\n self.assertEqual(1, len(routes))\n given_route = routes[0]\n self.assertEqual('dwForwardDest', given_route[0])\n self.assertEqual('dwForwardMask', given_route[1])\n self.assertEqual('dwForwardNextHop', given_route[2])\n self.assertEqual('dwForwardIfIndex', given_route[3])\n self.assertEqual('dwForwardMetric1', given_route[4])", "metadata": "root.TestWindowsUtils.test_routes", "header": "['class', 'TestWindowsUtils', '(', 'testutils', '.', 'CloudbaseInitTestBase', ')', ':', '___EOS___']", "index": 1944 } ]
[]
[]
0
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2013", " ", "Cloud", "base", " ", "Solut", "ion", "s", " ", "Sr", "l_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "License", "d", " ", "under", " ", "the", " ", "Ap", "ache", " ", "License", ",", " ", "Version", " ", "2.0", " ", "(", "the", " ", "\"", "License", "\");", " ", "you", " ", "may", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "not", " ", "use", " ", "this", " ", "file", " ", "except", " ", "in", " ", "compli", "anc", "e", " ", "with", " ", "the", " ", "License", ".", " ", "You", " ", "may", " ", "obtain", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "a", " ", "copy", " ", "of", " ", "the", " ", "License", " ", "at_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", " ", "http", "://", "www", ".", "apa", "che", ".", "org", "/", "license", "s", "/", "LICENSE", "-", "2.0_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "Un", "less", " ", "require", "d", " ", "by", " ", "applica", "ble", " ", "law", " ", "or", " ", "agree", "d", " ", "to", " ", "in", " ", "writ", "ing", ",", " ", "software", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "distributed", " ", "under", " ", "the", " ", "License", " ", "is", " ", "distributed", " ", "on", " ", "an", " ", "\"", "AS", " ", "IS", "\"", " ", "BAS", "IS", ",", " ", "WITH", "OUT_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "WAR", "RAN", "TIES", " ", "OR", " ", "CONDITION", "S", " ", "OF", " ", "ANY", " ", "KIND", ",", " ", "eit", "her", " ", "express", " ", "or", " ", "impli", "ed", ".", " ", "See", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "License", " ", "for", " ", "the", " ", "specific", " ", "language", " ", "govern", "ing", " ", "permissi", "ons", " ", "and", " ", "limit", "ations_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "under", " ", "the", " ", "License", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "contextlib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "functools_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "importlib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "unittest_", "._", "mock_", "as_", "mock_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "mock_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "from_", "oslo", "\\u", "config_", "import_", "cfg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "six_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "cloudb", "ase", "init_", "import_", "exception_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "cloudb", "ase", "init_", "._", "tests_", "import_", "fake_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "cloudb", "ase", "init_", "._", "tests_", "import_", "testutils_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "CONF_", "=_", "cfg_", "._", "CONF_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "WM", "IE", "rror_", "(_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "com", "\\u", "error_", "=_", "\"", "fake", " ", "data", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "Test", "s", " ", "for", " ", "the", " ", "windows", " ", "util", "s", " ", "class", ".'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "CONFIG", "\\u", "NAME_", "=_", "'", "Fake", "Config", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "DEST", "INATION", "_", "=_", "'", "192", ".1", "68.", "192", ".1", "6", "8", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "GATEWAY", "_", "=_", "'", "10.", "7.1", ".1", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "NET", "MASK_", "=_", "'", "255.", "255.", "255.", "0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "PASSWORD_", "=_", "'", "Passw", "0", "rd", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "SECTION_", "=_", "'", "fake", "\\u", "section", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "USERNAME_", "=_", "'", "Admi", "n", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u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", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\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u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\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\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u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\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "set", "Up_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "pywi", "ntype", "s", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "pywi", "ntype", "s", "\\u", "mock_", "._", "com", "\\u", "error_", "=_", "fake_", "._", "Fake", "Com", "Error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "com", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "process", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "security", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wmi", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wmi", "\\u", "mock_", "._", "x", "\\u", "wmi", "_", "=_", "WM", "IE", "rror_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "moves", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "xmlrpc", "\\u", "client", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "tz", "local", "\\u", "mock_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "error_", "=_", "Exception_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "module", "\\u", "path_", "=_", "\"", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "module", "\\u", "patcher_", "=_", "mock_", "._", "patch_", "._", "dict_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "sys", ".", "module", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "win32", "com", "'_", ":_", "self_", "._", "\\u", "win32", "com", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "win32", "process", "'_", ":_", "self_", "._", "\\u", "win32", "process", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "win32", "security", "'_", ":_", "self_", "._", "\\u", "win32", "security", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "win32", "net", "'_", ":_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "win32", "netc", "on", "'_", ":_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "wmi", "'_", ":_", "self_", "._", "\\u", "wmi", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "si", "x", ".", "moves", "'_", ":_", "self_", "._", "\\u", "moves", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "si", "x", ".", "moves", ".", "xmlrpc", "\\u", "client", "'_", ":_", "self_", "._", "\\u", "xmlrpc", "\\u", "client", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "ctype", "s", "'_", ":_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "pywi", "ntype", "s", "'_", ":_", "self_", "._", "\\u", "pywi", "ntype", "s", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "tz", "local", "'_", ":_", "self_", "._", "\\u", "tz", "local", "\\u", "mock_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "win", "ioct", "lco", "n", "'_", ":_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "module", "\\u", "patcher_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "\\u", "module", "\\u", "patcher_", "._", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "ctypes_", "._", "Get", "Las", "t", "Error_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "exception_", "._", "ctypes_", "._", "Format", "Error_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "mock_", "._", "patch_", "(_", "\"", "cloudb", "ase", "init", ".", "util", "s", ".", "windows", ".", "disk", ".", "GUID", "\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "windows", "\\u", "utils_", "=_", "importlib_", "._", "import", "\\u", "module_", "(_", "module", "\\u", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "=_", "self_", "._", "\\u", "moves", "\\u", "mock_", "._", "winreg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "=_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "windll_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "=_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "wintype", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "client", "\\u", "mock_", "=_", "self_", "._", "\\u", "win32", "com", "\\u", "mock_", "._", "client_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Window", "s", "Error_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "=_", "self_", "._", "windows", "\\u", "utils_", "._", "Window", "s", "Utils_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "iph", "lpa", "pi_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "nt", "dll_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "nt", "dll_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "snat", "cher", "_", "=_", "testutils_", "._", "Log", "Sna", "tche", "r_", "(_", "module", "\\u", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "privilege", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "reboot_", "(_", "self_", ",_", "mock", "\\u", "privilege", "\\u", "module_", ",_", "ret", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "expected", "\\u", "ret", "\\u", "value_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "privilege", "\\u", "module_", "._", "acquir", "e\\u", "privilege", "_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "api", "32_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "adv", "api", "32_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "api", "32_", "._", "Initiat", "e", "System", "Shut", "down", "Ex", "W_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "return", "\\u", "value_", "=_", "ret", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "ret", "\\u", "value_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Reboot", " ", "fail", "ed", ":", " ", "%", "r", "\"_", ",_", "expected", "\\u", "ret", "\\u", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "reboot_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "reboot_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "api", "32_", "._", "Initiat", "e", "System", "Shut", "down", "Ex", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Cloud", "base", "-", "Ini", "t", " ", "rebo", "ot", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "0_", ",_", "True_", ",_", "True_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "privilege", "\\u", "module_", "._", "acquir", "e\\u", "privilege", "_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win32", "security", "\\u", "mock_", "._", "SE", "\\u", "SHUTDOWN", "\\u", "NAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "reboot_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "reboot_", "(_", "ret", "\\u", "value_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "rebo", "ot", "\\u", "failed_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "reboot_", "(_", "ret", "\\u", "value_", "=_", "None_", ",_", "expected", "\\u", "ret", "\\u", "value_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "user", "\\u", "info_", "(_", "self_", ",_", "exc_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "get", "\\u", "mock_", "=_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Get", "Info_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "level_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "exc_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "get", "\\u", "mock_", "._", "side", "\\u", "effect_", "=_", "[_", "exc_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "error", "\\u", "class_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "Item", "Not", "Foun", "d", "Exception_", "if_", "\\u\\u\\uNL\\u\\u\\u_", "exc_", "._", "args_", "[_", "0_", "]_", "==_", "self_", "._", "\\u", "win", "utils_", "._", "NER", "R", "\\u", "User", "Not", "Found_", "else_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "error", "\\u", "class_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "user", "\\u", "info_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user", "get", "\\u", "mock_", "._", "return", "\\u", "value_", "=_", "ret_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "user", "\\u", "info_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "get", "\\u", "mock_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "None_", ",_", "self_", "._", "\\u", "USERNAME_", ",_", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "ret_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "info_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "info_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "info", "\\u", "not", "\\u", "found_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exc_", "=_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "error_", "(_", "self_", "._", "\\u", "win", "utils_", "._", "NER", "R", "\\u", "User", "Not", "Found_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "*_", "(_", "[_", "mock_", "._", "Mock_", "(_", ")_", "]_", "*_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "info_", "(_", "exc_", "=_", "exc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "info", "\\u", "failed_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exc_", "=_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "error_", "(_", "*_", "(_", "[_", "mock_", "._", "Mock_", "(_", ")_", "]_", "*_", "3_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "info_", "(_", "exc_", "=_", "exc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "user", "\\u", "info", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "user", "\\u", "password_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "expire_", "=_", "False_", ",_", "fail_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "info_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "return", "\\u", "value_", "=_", "user", "\\u", "info_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "\\u", "info_", "[_", "\"", "password", "\"_", "]_", "=_", "self_", "._", "\\u", "PASSWORD_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "expire_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "info_", "[_", "\"", "flags", "\"_", "]_", "&=_", "~_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "UF", "\\u", "DON", "T", "\\u", "EXPIRE", "\\u", "PASS", "WD", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "info_", "[_", "\"", "flags", "\"_", "]_", "|=_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "UF", "\\u", "DON", "T", "\\u", "EXPIRE", "\\u", "PASS", "WD", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Set", "Info_", "._", "side", "\\u", "effect_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "error_", "(_", "*_", "(_", "[_", "mock_", "._", "Mock_", "(_", ")_", "]_", "*_", "3_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "user", "\\u", "password_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "PASSWORD_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "user", "\\u", "password_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "self_", "._", "\\u", "PASSWORD_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "password", "\\u", "expires_", "=_", "expire_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Set", "Info_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "None_", ",_", "self_", "._", "\\u", "USERNAME_", ",_", "1_", ",_", "user", "\\u", "info_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "user", "\\u", "password_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "user", "\\u", "password_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "user", "\\u", "password", "\\u", "expire_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "user", "\\u", "password_", "(_", "expire_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "user", "\\u", "password", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "user", "\\u", "password_", "(_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "user", "\\u", "info", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "fail_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "info_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "return", "\\u", "value_", "=_", "user", "\\u", "info_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "\\u", "info_", "[_", "\"", "flags", "\"_", "]_", "&=_", "~_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "UF", "\\u", "DON", "T", "\\u", "EXPIRE", "\\u", "PASS", "WD", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "\\u", "info_", "[_", "\"", "password", "\\u", "expir", "ed", "\"_", "]_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Set", "Info_", "._", "side", "\\u", "effect_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "error_", "(_", "*_", "(_", "[_", "mock_", "._", "Mock_", "(_", ")_", "]_", "*_", "3_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Set", "Info_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "None_", ",_", "self_", "._", "\\u", "USERNAME_", ",_", "4_", ",_", "user", "\\u", "info_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "change", "\\u", "password", "\\u", "next", "\\u", "logo", "n_", "(_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "user", "\\u", "info", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "user", "\\u", "exists_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", ",_", "exists_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "exists_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "side", "\\u", "effect_", "=_", "[_", "exception_", "._", "Item", "Not", "Foun", "d", "Exception_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "user", "\\u", "exists_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "False_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "user", "\\u", "exists_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "True_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "user", "\\u", "exists_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "user", "\\u", "exists_", "(_", "exists_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "user", "\\u", "doe", "s", "\\u", "not", "\\u", "exist_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "user", "\\u", "exists_", "(_", "exists_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "sanitize", "\\u", "shell", "\\u", "input_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "unsa", "niti", "sed_", "=_", "'", " ", "\"", " ", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "sanitize", "\\u", "shell", "\\u", "input_", "(_", "unsa", "niti", "sed_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sani", "tis", "ed_", "=_", "'", " ", "\\\\\\\\\"", " ", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sani", "tis", "ed_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".'_", "\\u\\u\\uNL\\u\\u\\u_", "'\\u", "get", "\\u", "cch", "\\u", "referenced", "\\u", "domain", "\\u", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain_", "(_", "self_", ",_", "mock", "\\u", "cch", "\\u", "referenced", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "val_", ",_", "last", "\\u", "error_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cb", "Si", "d_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sid_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "size_", "=_", "1024_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cch", "Reference", "d", "Doma", "in", "Name_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "domain", "Name_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sid", "Name", "Use_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "api", "32_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "adv", "api", "32_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "cch", "\\u", "referenced", "_", "._", "return", "\\u", "value_", "=_", "cch", "Reference", "d", "Doma", "in", "Name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "string", "\\u", "buffer_", "._", "return", "\\u", "value_", "=_", "sid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "sizeof_", "._", "return", "\\u", "value_", "=_", "size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "return", "\\u", "value_", "=_", "domain", "Name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "api", "32_", "._", "Look", "up", "Account", "Name", "W_", "._", "return", "\\u", "value_", "=_", "ret", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Cann", "ot", " ", "get", " ", "user", " ", "SID", ":", " ", "%", "r", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "api", "32_", "._", "Look", "up", "Account", "Name", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "0_", ",_", "six_", "._", "text", "\\u", "type_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", ",_", "sid_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "(_", "cb", "Si", "d_", ")_", ",_", "domain", "Name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "(_", "cch", "Reference", "d", "Doma", "in", "Name_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "(_", "sid", "Name", "Use_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "(_", "sid_", ",_", "domain", "Name_", "._", "value_", ")_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "cch", "\\u", "referenced", "_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "cch", "\\u", "referenced", "\\u", "domain", "\\u", "name_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "sizeof_", "._", "side", "\\u", "effect_", "=_", "[_", "42_", ",_", "24_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "cch", "\\u", "referenced", "\\u", "domain", "\\u", "name_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "domain", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "DWORD_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "42_", "//_", "24_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "result_", ",_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "DWORD_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fake", "\\u", "obj_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain_", "(_", "ret", "\\u", "val_", "=_", "fake", "\\u", "obj_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain", "\\u", "no", "\\u", "return", "\\u", "value_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "and", "\\u", "domain_", "(_", "ret", "\\u", "val_", "=_", "None_", ",_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "Win", "32", "\\u", "LOCAL", "GROU", "P", "\\u", "MEMBER", "S", "\\u", "INFO", "\\u", "3", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "self_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "Win", "32", "\\u", "LOCAL", "GROU", "P", "\\u", "MEMBER", "S", "\\u", "INFO", "\\u", "3_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "lm", "i_", "=_", "mock", "\\u", "Win", "32", "\\u", "LOCAL", "GROU", "P", "\\u", "MEMBER", "S", "\\u", "INFO", "\\u", "3_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "group", "\\u", "name_", "=_", "'", "Admi", "ns", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net", "api", "32_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "net", "api", "32_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "net", "api", "32_", "._", "Net", "Local", "Group", "Add", "Members_", "._", "return", "\\u", "value_", "=_", "ret", "\\u", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "in", "\\u", "alias_", "=_", "ret", "\\u", "value_", "!=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "MEMBER", "\\u", "IN", "\\u", "ALIAS_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "value_", "is_", "not_", "0_", "and_", "is", "\\u", "in", "\\u", "alias_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "USERNAME_", ",_", "group", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "group", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "net", "api", "32_", "._", "Net", "Local", "Group", "Add", "Members_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "0_", ",_", "six_", "._", "text", "\\u", "type_", "(_", "group", "\\u", "name_", ")_", ",_", "3_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "address", "of_", "._", "return", "\\u", "value_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "address", "of_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "lm", "i_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "lm", "i_", "._", "lg", "rmi", "3", "\\u", "domain", "and", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "six_", "._", "text", "\\u", "type_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group", "\\u", "no", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "ret", "\\u", "value_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group", "\\u", "not", "\\u", "found_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "NER", "R", "\\u", "Group", "Not", "Found_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group", "\\u", "access", "\\u", "deni", "ed_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "ACCESS", "\\u", "DEN", "IED", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group", "\\u", "no", "\\u", "member_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "NO", "\\u", "SUC", "H", "\\u", "MEMBER", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group", "\\u", "member", "\\u", "in", "\\u", "alias_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "MEMBER", "\\u", "IN", "\\u", "ALIAS_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group", "\\u", "invalid", "\\u", "member_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "user", "\\u", "to", "\\u", "local", "\\u", "group_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INVALID", "\\u", "MEMBER", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "user", "\\u", "info", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "user", "\\u", "sid_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", ",_", "fail_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "side", "\\u", "effect_", "=_", "[_", "exception_", "._", "Item", "Not", "Foun", "d", "Exception_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "user", "\\u", "sid_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "None_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user", "\\u", "info_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "return", "\\u", "value_", "=_", "user", "\\u", "info_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "user", "\\u", "sid_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "user", "\\u", "info_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "4_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "response_", ",_", "str_", "(_", "user", "\\u", "info_", "[_", "\"", "user", "\\u", "sid", "\"_", "]_", ")_", "[_", "6_", ":_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "sid_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "sid_", "(_", "fail_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "sid", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "sid_", "(_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "create", "\\u", "user_", "(_", "self_", ",_", "expire_", "=_", "False_", ",_", "fail_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "info_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "name", "\"_", ":_", "self_", "._", "\\u", "USERNAME_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "password", "\"_", ":_", "self_", "._", "\\u", "PASSWORD_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "priv", "\"_", ":_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "USER", "\\u", "PRIV", "\\u", "USER_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "flags", "\"_", ":_", "(_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "UF", "\\u", "NORMA", "L", "\\u", "ACCOUNT", "_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "UF", "\\u", "SCRIPT_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "expire_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "info_", "[_", "\"", "flags", "\"_", "]_", "|=_", "self_", "._", "\\u", "win32", "netc", "on", "\\u", "mock_", "._", "UF", "\\u", "DON", "T", "\\u", "EXPIRE", "\\u", "PASS", "WD", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Add_", "._", "side", "\\u", "effect_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "error_", "(_", "*_", "(_", "[_", "mock_", "._", "Mock_", "(_", ")_", "]_", "*_", "3_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "create", "\\u", "user_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "PASSWORD_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "create", "\\u", "user_", "(_", "self_", "._", "\\u", "USERNAME_", ",_", "self_", "._", "\\u", "PASSWORD_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "password", "\\u", "expires_", "=_", "expire_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win32", "net", "\\u", "mock_", "._", "Net", "User", "Add_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "None_", ",_", "1_", ",_", "user", "\\u", "info_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "create", "\\u", "user_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "expire_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "create", "\\u", "user_", "(_", "expire_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "create", "\\u", "user_", "(_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Win", "32", "\\u", "PROFILE", "INFO", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "self_", ",_", "mock", "\\u", "Win", "32", "\\u", "PROFILE", "INFO_", ",_", "logo", "n_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "user_", ",_", "load", "\\u", "profile_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "HANDLE_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pi_", "=_", "self_", "._", "windows", "\\u", "utils_", "._", "Win", "32", "\\u", "PROFILE", "INFO_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "api", "32_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "adv", "api", "32_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "env_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "user", "env_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "kernel32_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "api", "32_", "._", "Logo", "n", "User", "W_", "._", "return", "\\u", "value_", "=_", "logo", "n_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "logo", "n_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "User", " ", "logo", "n", " ", "fail", "ed", ":", " ", "%", "r", "\"_", ",_", "last", "\\u", "error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "USERNAME_", ",_", "self_", "._", "\\u", "PASSWORD_", ",_", "domain_", "=_", "'.'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "load", "\\u", "profile_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "load", "\\u", "profile_", "and_", "not_", "load", "user_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "env_", "._", "Load", "User", "Profil", "e", "W_", "._", "return", "\\u", "value_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "kernel32_", "._", "Clos", "e", "Handle_", "._", "return", "\\u", "value_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Cann", "ot", " ", "load", " ", "user", " ", "profile", ":", " ", "%", "r", "\"_", ",_", "last", "\\u", "error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "USERNAME_", ",_", "self_", "._", "\\u", "PASSWORD_", ",_", "domain_", "=_", "'.'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "load", "\\u", "profile_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user", "env_", "._", "Load", "User", "Profil", "e", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "HANDLE_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "pi_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "kernel32_", "._", "Clos", "e", "Handle_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "HANDLE_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "not_", "load", "\\u", "profile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "USERNAME_", ",_", "self_", "._", "\\u", "PASSWORD_", ",_", "domain_", "=_", "'.'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "load", "\\u", "profile_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "response_", "is_", "not_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "size_", "=_", "1024_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "sizeof_", "._", "return", "\\u", "value_", "=_", "size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "Win", "32", "\\u", "PROFILE", "INFO_", "._", "return", "\\u", "value_", "=_", "load", "user_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "USERNAME_", ",_", "self_", "._", "\\u", "PASSWORD_", ",_", "domain_", "=_", "'.'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "load", "\\u", "profile_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "user", "env_", "._", "Load", "User", "Profil", "e", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "HANDLE_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "response_", "is_", "not_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session", "\\u", "fail", "\\u", "load", "\\u", "false_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "logo", "n_", "=_", "0_", ",_", "load", "user_", "=_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session", "\\u", "fail", "\\u", "load", "\\u", "true_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "logo", "n_", "=_", "0_", ",_", "load", "user_", "=_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session", "\\u", "load", "\\u", "true_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "logo", "n_", "=_", "m_", ",_", "load", "user_", "=_", "n_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session", "\\u", "load", "\\u", "false_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "logo", "n_", "=_", "m_", ",_", "load", "user_", "=_", "n_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session", "\\u", "no", "\\u", "load", "\\u", "true_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "logo", "n_", "=_", "m_", ",_", "load", "user_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session", "\\u", "no", "\\u", "load", "\\u", "false_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "create", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "logo", "n_", "=_", "m_", ",_", "load", "user_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "load", "\\u", "profile_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "close", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "token_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "._", "Clos", "e", "Handle_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "close", "\\u", "user", "\\u", "logo", "n", "\\u", "session_", "(_", "token_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "._", "Clos", "e", "Handle_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "token_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "ctype", "s", ".", "wind", "ll", ".", "kernel", "32.", "Set", "Compute", "r", "Name", "Ex", "W", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "host", "\\u", "name_", "(_", "self_", ",_", "mock", "\\u", "Set", "Compute", "r", "Name", "Ex", "W_", ",_", "ret", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "Set", "Compute", "r", "Name", "Ex", "W_", "._", "return", "\\u", "value_", "=_", "ret", "\\u", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "ret", "\\u", "value_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Cann", "ot", " ", "set", " ", "host", " ", "name", ":", " ", "%", "r", "\"_", ",_", "last", "\\u", "error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "host", "\\u", "name_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "host", "\\u", "name_", "(_", "'", "fake", " ", "name", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "Set", "Compute", "r", "Name", "Ex", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "Compute", "r", "Name", "Phys", "ical", "Dn", "s", "Host", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "six_", "._", "text", "\\u", "type_", "(_", "'", "fake", " ", "name", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "host", "\\u", "name_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "host", "\\u", "name_", "(_", "ret", "\\u", "value_", "=_", "'", "fake", " ", "response", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "host", "\\u", "exception_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "host", "\\u", "name_", "(_", "ret", "\\u", "value_", "=_", "None_", ",_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "user", "\\u", "sid", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "user", "\\u", "home_", "(_", "self_", ",_", "user", "\\u", "sid_", ",_", "mock", "\\u", "get", "\\u", "user", "\\u", "sid_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "user", "\\u", "sid_", "._", "return", "\\u", "value_", "=_", "user", "\\u", "sid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "user", "\\u", "home_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "user", "\\u", "sid_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "user", "\\u", "sid_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "self_", "._", "\\u", "USERNAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "HKEY", "\\u", "LOCAL", "\\u", "MACHINE", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "SOFT", "WARE", "\\\\\\\\", "Micro", "soft", "\\\\\\\\", "Window", "s", " ", "NT", "\\\\\\\\", "Curr", "ent", "Version", "\\\\\\\\'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Profil", "e", "List", "\\\\\\\\", "%", "s", "'_", "%_", "mock", "\\u", "get", "\\u", "user", "\\u", "sid_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "response_", "is_", "not_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "._", "return", "\\u", "value_", "._", "\\u\\u", "enter\\u\\u_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Profil", "e", "Image", "Path", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "\"", "Home", " ", "director", "y", " ", "not", " ", "found", " ", "for", " ", "user", " ", "%", "r", "\"_", "%_", "self_", "._", "\\u", "USERNAME_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "response_", "is_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "home_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "home_", "(_", "user_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "user", "\\u", "home", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "user", "\\u", "home_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "check", "\\u", "os", "\\u", "version", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "network", "\\u", "adapters_", "(_", "self_", ",_", "is", "\\u", "xp", "\\u", "2003", "_", ",_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "conn_", "=_", "self_", "._", "\\u", "wmi", "\\u", "mock_", "._", "WM", "I_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "response_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "query_", "._", "return", "\\u", "value_", "=_", "[_", "mock", "\\u", "response_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", "._", "return", "\\u", "value_", "=_", "not_", "is", "\\u", "xp", "\\u", "2003", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "wq", "l_", "=_", "(_", "'", "SELECT", " ", "*", " ", "FROM", " ", "Win", "32", "\\u", "Network", "Adapt", "er", " ", "WHE", "RE", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Adapt", "er", "Type", "Id", " ", "=", " ", "0", " ", "AND", " ", "MAC", "Address", " ", "IS", " ", "NOT", " ", "NULL", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "is", "\\u", "xp", "\\u", "2003", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "wq", "l_", "+=_", "'", " ", "AND", " ", "Phys", "ical", "Adapt", "er", " ", "=", " ", "Tru", "e", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "network", "\\u", "adapters_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "query_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "wq", "l_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "(_", "mock", "\\u", "response_", "._", "Name_", ",_", "mock", "\\u", "response_", "._", "MAC", "Address_", ")_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "network", "\\u", "adapters_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "network", "\\u", "adapters_", "(_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "network", "\\u", "adapter", "s", "\\u", "xp", "\\u", "2003", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "network", "\\u", "adapters_", "(_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "self_", ",_", "adapter_", "=_", "True_", ",_", "static", "\\u", "val_", "=_", "(_", "0_", ",_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "gateway", "\\u", "val_", "=_", "(_", "0_", ",_", ")_", ",_", "dns", "\\u", "val_", "=_", "(_", "0_", ",_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "conn_", "=_", "self_", "._", "\\u", "wmi", "\\u", "mock_", "._", "WM", "I_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mac", "\\u", "address_", "=_", "'", "5", "4", ":", "EE", ":", "7", "5", ":", "1", "9", ":", "F4", ":", "6", "1", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address_", "=_", "'", "10.1", "0.10", ".1", "0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "broadcast_", "=_", "'", "0.", "0.", "0.", "0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dns", "\\u", "list_", "=_", "[_", "'", "8.8", ".8", ".8", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "set\\u", "static", "\\u", "call_", "=_", "functools_", "._", "partial_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "static", "\\u", "network", "\\u", "config_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mac", "\\u", "address_", ",_", "address_", ",_", "self_", "._", "\\u", "NET", "MASK_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "broadcast_", ",_", "self_", "._", "\\u", "GATEWAY", "_", ",_", "dns", "\\u", "list_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "adapter_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "adapter_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "set\\u", "static", "\\u", "call_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "expected", "\\u", "log_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "(_", "ret", "\\u", "val_", ",_", ")_", ",_", "msg_", "in_", "(_", "(_", "static", "\\u", "val_", ",_", "\"", "Sett", "ing", " ", "static", " ", "IP", " ", "address", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "gateway", "\\u", "val_", ",_", "\"", "Sett", "ing", " ", "static", " ", "gateway", "s", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "dns", "\\u", "val_", ",_", "\"", "Sett", "ing", " ", "static", " ", "DNS", " ", "server", "s", "\"_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "ret", "\\u", "val_", "in_", "(_", "0_", ",_", "1_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expected", "\\u", "log_", "._", "append_", "(_", "msg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "query_", "._", "return", "\\u", "value_", "=_", "adapter_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "=_", "adapter_", "[_", "0_", "]_", "._", "associ", "ator", "s_", "._", "return", "\\u", "value_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "._", "Enable", "Static", "_", "._", "return", "\\u", "value_", "=_", "static", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "._", "Set", "Gat", "ewa", "ys_", "._", "return", "\\u", "value_", "=_", "gateway", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "._", "Set", "DNS", "Server", "Sear", "ch", "Order_", "._", "return", "\\u", "value_", "=_", "dns", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter_", "._", "\\u\\u", "len\\u\\u_", "._", "return", "\\u", "value_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "static", "\\u", "val_", "[_", "0_", "]_", ">_", "1_", "or_", "gateway", "\\u", "val_", "[_", "0_", "]_", ">_", "1_", "or_", "dns", "\\u", "val_", "[_", "0_", "]_", ">_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "set\\u", "static", "\\u", "call_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "set\\u", "static", "\\u", "call_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "static", "\\u", "val_", "[_", "0_", "]_", "or_", "gateway", "\\u", "val_", "[_", "0_", "]_", "or_", "dns", "\\u", "val_", "[_", "0_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "False_", "(_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "log_", ",_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "select_", "=_", "(_", "\"", "SELECT", " ", "*", " ", "FROM", " ", "Win", "32", "\\u", "Network", "Adapt", "er", " ", "WHE", "RE", " ", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "MAC", "Address", " ", "=", " ", "'{}'\"_", "._", "format_", "(_", "mac", "\\u", "address_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "query_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "select_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter_", "[_", "0_", "]_", "._", "associ", "ator", "s_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "wmi", "\\u", "result", "\\u", "class_", "=_", "'", "Win", "32", "\\u", "Network", "Adapt", "er", "Configura", "tion", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "._", "Enable", "Static", "_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "address_", "]_", ",_", "[_", "self_", "._", "\\u", "NET", "MASK_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "._", "Set", "Gat", "ewa", "ys_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "self_", "._", "\\u", "GATEWAY", "_", "]_", ",_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adapter", "\\u", "config_", "._", "Set", "DNS", "Server", "Sear", "ch", "Order_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "dns", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "check", "\\u", "os", "\\u", "version", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "\"", "cloudb", "ase", "init", ".", "util", "s", ".", "windows", ".", "network", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "\".", "get", "\\u", "adapter", "\\u", "addresse", "s", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "v6", "adapters_", "=_", "True_", ",_", "v6", "error_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "frie", "ndl", "y", "\\u", "name_", "=_", "\"", "Ether", "net", "0", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "interface", "\\u", "index_", "=_", "\"", "4", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mac", "\\u", "address_", "=_", "'", "5", "4", ":", "EE", ":", "7", "5", ":", "1", "9", ":", "F4", ":", "6", "1", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address", "6_", "=_", "\"", "200", "1", ":", "db", "8", "::", "3", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net", "mask", "6_", "=_", "\"", "64", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "gateway", "6_", "=_", "\"", "200", "1", ":", "db", "8", "::", "1", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "conn_", "=_", "self_", "._", "\\u", "wmi", "\\u", "mock_", "._", "WM", "I_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "neti", "p_", "=_", "conn_", "._", "return", "\\u", "value_", "._", "query_", "._", "return", "\\u", "value_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "v6", "error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "neti", "p_", "._", "Create_", "._", "side", "\\u", "effect_", "=_", "WM", "IE", "rror_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "adapter", "\\u", "addresses_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "v6", "adapters_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "adapter", "\\u", "addresses_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "mac", "\\u", "address", "\"_", ":_", "mac", "\\u", "address_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "frie", "ndl", "y", "\\u", "name", "\"_", ":_", "frie", "ndl", "y", "\\u", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "interface", "\\u", "index", "\"_", ":_", "interface", "\\u", "index_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "return", "\\u", "value_", "=_", "adapter", "\\u", "addresses_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", "._", "return", "\\u", "value_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "set\\u", "static", "\\u", "call_", "=_", "functools_", "._", "partial_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mac", "\\u", "address_", ",_", "address", "6_", ",_", "net", "mask", "6_", ",_", "gateway", "6_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "expected", "\\u", "log_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", "._", "return", "\\u", "value_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expected", "\\u", "log_", "._", "append_", "(_", "\"", "Sett", "ing", " ", "IP", "v6", " ", "info", " ", "not", " ", "avail", "able", " ", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "on", " ", "this", " ", "system", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "v6", "adapters_", "or_", "v6", "error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "set\\u", "static", "\\u", "call_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expected", "\\u", "log_", "._", "append_", "(_", "\"", "Sett", "ing", " ", "IP", "v6", " ", "info", " ", "for", " ", "%", "s", "\"_", "%_", "frie", "ndl", "y", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "set\\u", "static", "\\u", "call_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "select_", "=_", "(_", "\"", "SELECT", " ", "*", " ", "FROM", " ", "MS", "FT", "\\u", "Net", "IPA", "ddress", " ", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "WHE", "RE", " ", "Interface", "Ali", "as", " ", "=", " ", "'{}'\"_", "._", "format_", "(_", "frie", "ndl", "y", "\\u", "name_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "query_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "select_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "params_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Interface", "Index", "\"_", ":_", "interface", "\\u", "index_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Interface", "Ali", "as", "\"_", ":_", "frie", "ndl", "y", "\\u", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "IPA", "ddress", "\"_", ":_", "address", "6_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Address", "Famil", "y", "\"_", ":_", "self_", "._", "windows", "\\u", "utils_", "._", "AF", "\\u", "INE", "T6", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Pref", "ix", "Length", "\"_", ":_", "net", "mask", "6_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Manu", "al", " ", "set", " ", "type", "._", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Type", "\"_", ":_", "self_", "._", "windows", "\\u", "utils_", "._", "UNI", "CAST", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Pref", "ix", "Orig", "in", "\"_", ":_", "self_", "._", "windows", "\\u", "utils_", "._", "MANU", "AL_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Su", "ffi", "x", "Orig", "in", "\"_", ":_", "self_", "._", "windows", "\\u", "utils_", "._", "MANU", "AL_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Address", "State", "\"_", ":_", "self_", "._", "windows", "\\u", "utils_", "._", "PREFER", "RED", "\\u", "ADDR_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "No", " ", "expir", "y", "._", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Valid", "Life", "time", "\"_", ":_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Prefe", "rre", "d", "Life", "time", "\"_", ":_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Ski", "p", "As", "Sou", "rce", "\"_", ":_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Default", "Gat", "ewa", "y", "\"_", ":_", "gateway", "6_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Polic", "y", "Stor", "e", "\"_", ":_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Pass", "Thr", "u", "\"_", ":_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "neti", "p_", "._", "Create_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "**_", "params_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "log_", ",_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "val1_", "=_", "(_", "1_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val2_", "=_", "(_", "1_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val", "3_", "=_", "(_", "0_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "static", "\\u", "val_", "=_", "ret", "\\u", "val1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "gateway", "\\u", "val_", "=_", "ret", "\\u", "val2_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dns", "\\u", "val_", "=_", "ret", "\\u", "val", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "query", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "adapter_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "cann", "ot", "\\u", "set\\u", "ip_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "val1_", "=_", "(_", "2_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "static", "\\u", "val_", "=_", "ret", "\\u", "val1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "cann", "ot", "\\u", "set\\u", "gateway_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "val1_", "=_", "(_", "1_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val2_", "=_", "(_", "2_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "static", "\\u", "val_", "=_", "ret", "\\u", "val1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "gateway", "\\u", "val_", "=_", "ret", "\\u", "val2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "cann", "ot", "\\u", "set\\u", "DNS", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "val1_", "=_", "(_", "1_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val2_", "=_", "(_", "1_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val", "3_", "=_", "(_", "2_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "static", "\\u", "val_", "=_", "ret", "\\u", "val1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "gateway", "\\u", "val_", "=_", "ret", "\\u", "val2_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dns", "\\u", "val_", "=_", "ret", "\\u", "val", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "no", "\\u", "reboot_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "val1_", "=_", "(_", "0_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val2_", "=_", "(_", "0_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret", "\\u", "val", "3_", "=_", "(_", "0_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config_", "(_", "static", "\\u", "val_", "=_", "ret", "\\u", "val1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "gateway", "\\u", "val_", "=_", "ret", "\\u", "val2_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dns", "\\u", "val_", "=_", "ret", "\\u", "val", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6", "\\u", "no", "\\u", "adapters_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6_", "(_", "v6", "adapters_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "static", "\\u", "network", "\\u", "config", "\\u", "v6_", "(_", "v6", "error_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "(_", "self_", ",_", "section_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "(_", "section_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "section_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "config", "\\u", "key_", "+_", "section_", "+_", "'\\\\\\\\'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "config", "\\u", "key_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name", "\\u", "with", "\\u", "section_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "(_", "self_", "._", "\\u", "SECTION_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name", "\\u", "no", "\\u", "section_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "config", "\\u", "value_", "(_", "self_", ",_", "value_", ",_", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "key", "\\u", "name_", "=_", "(_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "config", "\\u", "key_", "+_", "self_", "._", "\\u", "SECTION_", "+_", "'\\\\\\\\'_", "+_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "._", "return", "\\u", "value_", "=_", "key", "\\u", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "config", "\\u", "value_", "(_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ",_", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "SECTION_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Creat", "e", "Key_", "._", "return", "\\u", "value_", "._", "\\u\\u", "enter\\u\\u_", "._", "return", "\\u", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Creat", "e", "Key_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "HKEY", "\\u", "LOCAL", "\\u", "MACHINE", "_", ",_", "key", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "self_", "._", "\\u", "SECTION_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "type_", "(_", "value_", ")_", "==_", "int_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Set", "Value", "Ex_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "key_", ",_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ",_", "0_", ",_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "REG", "\\u", "DWORD_", ",_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Set", "Value", "Ex_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "key_", ",_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ",_", "0_", ",_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "REG", "\\u", "SZ", "_", ",_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "config", "\\u", "value", "\\u", "int_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "config", "\\u", "value_", "(_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "config", "\\u", "value", "\\u", "not", "\\u", "int_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "config", "\\u", "value_", "(_", "'", "1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "config", "\\u", "value_", "(_", "self_", ",_", "value_", ",_", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "key", "\\u", "name_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "config", "\\u", "key_", "+_", "self_", "._", "\\u", "SECTION_", "+_", "'\\\\\\\\'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "name_", "+=_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "type_", "(_", "value_", ")_", "==_", "int_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "reg", "type_", "=_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "REG", "\\u", "DWORD_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "reg", "type_", "=_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "REG", "\\u", "SZ", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "return", "\\u", "value_", "=_", "(_", "value_", ",_", "reg", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "value_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "._", "side", "\\u", "effect_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Window", "s", "Error_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "config", "\\u", "value_", "(_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "SECTION_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "None_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "._", "return", "\\u", "value_", "=_", "key", "\\u", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "config", "\\u", "value_", "(_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "SECTION_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "HKEY", "\\u", "LOCAL", "\\u", "MACHINE", "_", ",_", "key", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "config", "\\u", "key", "\\u", "name_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "self_", "._", "\\u", "SECTION_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "(_", ")_", "._", "\\u\\u", "enter\\u\\u_", "(_", ")_", ",_", "self_", "._", "\\u", "CONFIG", "\\u", "NAME_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "value_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "config", "\\u", "value", "\\u", "type", "\\u", "int_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "config", "\\u", "value_", "(_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "config", "\\u", "value", "\\u", "type", "\\u", "str_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "config", "\\u", "value_", "(_", "'", "fake", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "config", "\\u", "value", "\\u", "type", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "config", "\\u", "value_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "time", ".", "sleep", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "wait", "\\u", "for", "\\u", "boot", "\\u", "completion_", "(_", "self_", ",_", "\\u_", ",_", "ret", "\\u", "vals_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "side", "\\u", "effect_", "=_", "ret", "\\u", "vals_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "wait", "\\u", "for", "\\u", "boot", "\\u", "completion_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "key_", "=_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "._", "return", "\\u", "value_", "._", "\\u\\u", "enter\\u\\u_", "._", "return", "\\u", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "HKEY", "\\u", "LOCAL", "\\u", "MACHINE", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "SYSTEM", "\\\\\\\\", "Set", "up", "\\\\\\\\", "Status", "\\\\\\\\", "Sys", "prep", "Status", "\"_", ",_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "KEY", "\\u", "READ_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "expected", "\\u", "log_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "gen", "\\u", "states_", "in_", "ret", "\\u", "vals_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gen", "\\u", "state_", "=_", "gen", "\\u", "states_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "gen", "\\u", "state_", "==_", "7_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "expected", "\\u", "log_", "._", "append_", "(_", "'", "Wait", "ing", " ", "for", " ", "sysp", "rep", " ", "completion", ".", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "General", "izatio", "n", "State", ":", " ", "%", "d", "'_", "%_", "gen", "\\u", "state_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "key_", ",_", "\"", "General", "izatio", "n", "State", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "log_", ",_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "wait", "\\u", "for", "\\u", "boot", "\\u", "completion_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "vals_", "=_", "[_", "[_", "7_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "wait", "\\u", "for", "\\u", "boot", "\\u", "completion_", "(_", "ret", "\\u", "vals_", "=_", "ret", "\\u", "vals_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "wait", "\\u", "for", "\\u", "boot", "\\u", "completion", "\\u", "wait_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ret", "\\u", "vals_", "=_", "[_", "[_", "1_", "]_", ",_", "[_", "7_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "wait", "\\u", "for", "\\u", "boot", "\\u", "completion_", "(_", "ret", "\\u", "vals_", "=_", "ret", "\\u", "vals_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "service_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "conn_", "=_", "self_", "._", "\\u", "wmi", "\\u", "mock_", "._", "WM", "I_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "Win", "32", "\\u", "Service_", "._", "return", "\\u", "value_", "=_", "[_", "'", "fake", " ", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "service_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "conn_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "mon", "ike", "r_", "=_", "'//", "./", "root", "/", "cim", "v2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "return", "\\u", "value_", "._", "Win", "32", "\\u", "Service_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "Name_", "=_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "fake", " ", "name", "'_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "service", "\\u", "exists_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "service_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "service_", "._", "return", "\\u", "value_", "=_", "'", "not", " ", "Non", "e", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "check", "\\u", "service", "\\u", "exists_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "service", "\\u", "status_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "service_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "service_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "service_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "service", "\\u", "status_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "mock", "\\u", "service_", "._", "State_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "service_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "service_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "service_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "mock", "\\u", "service_", "._", "Start", "Mode_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "service_", ",_", "ret", "\\u", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "service_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "service_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "service_", "._", "Change", "Start", "Mode_", "._", "return", "\\u", "value_", "=_", "(_", "ret", "\\u", "val_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", "!=_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "service", "\\u", "start", "\\u", "mode_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "fake", " ", "name", "'_", ",_", "'", "fake", " ", "mode", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "'", "fake", " ", "name", "'_", ",_", "'", "fake", " ", "mode", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "service_", "._", "Change", "Start", "Mode_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "'", "fake", " ", "mode", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "ret", "\\u", "val_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode", "\\u", "exception_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "ret", "\\u", "val_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "start", "\\u", "service_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "service_", ",_", "ret", "\\u", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "service_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "service_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "service_", "._", "Start", "Service_", "._", "return", "\\u", "value_", "=_", "(_", "ret", "\\u", "val_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", "!=_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "start", "\\u", "service_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "start", "\\u", "service_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "\"", "Start", "ing", " ", "service", " ", "fake", " ", "name", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "service_", "._", "Start", "Service_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "start", "\\u", "service_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "ret", "\\u", "val_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "start", "\\u", "service", "\\u", "exception_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "service", "\\u", "start", "\\u", "mode_", "(_", "ret", "\\u", "val_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "stop", "\\u", "service_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "service_", ",_", "ret", "\\u", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "service_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "service_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "service_", "._", "Sto", "p", "Service_", "._", "return", "\\u", "value_", "=_", "(_", "ret", "\\u", "val_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", "!=_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "stop", "\\u", "service_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "stop", "\\u", "service_", "(_", "'", "fake", " ", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "\"", "Stopp", "ing", " ", "service", " ", "fake", " ", "name", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "service_", "._", "Sto", "p", "Service_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "stop", "\\u", "service_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "stop", "\\u", "service_", "(_", "ret", "\\u", "val_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "stop", "\\u", "service", "\\u", "exception_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "stop", "\\u", "service_", "(_", "ret", "\\u", "val_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "stop", "\\u", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "time", ".", "sleep", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "terminate_", "(_", "self_", ",_", "mock", "\\u", "sleep_", ",_", "mock", "\\u", "stop", "\\u", "service_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "terminate_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "stop", "\\u", "service_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "service", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "sleep_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "default", "\\u", "gateway_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "routin", "g", "\\u", "table_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", "._", "return", "\\u", "value_", "=_", "[_", "routin", "g", "\\u", "table_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "default", "\\u", "gateway_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "routin", "g", "\\u", "table_", "[_", "0_", "]_", "==_", "'", "0.", "0.", "0.", "0", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "(_", "routin", "g", "\\u", "table_", "[_", "3_", "]_", ",_", "routin", "g", "\\u", "table_", "[_", "2_", "]_", ")_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "(_", "None_", ",_", "None_", ")_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "default", "\\u", "gateway_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "routin", "g", "\\u", "table_", "=_", "[_", "'", "0.", "0.", "0.", "0", "'_", ",_", "'", "1.1", ".1", ".1", "'_", ",_", "self_", "._", "\\u", "GATEWAY", "_", ",_", "'", "8.8", ".8", ".8", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "default", "\\u", "gateway_", "(_", "routin", "g", "\\u", "table_", "=_", "routin", "g", "\\u", "table_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "default", "\\u", "gateway", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "routin", "g", "\\u", "table_", "=_", "[_", "'", "1.1", ".1", ".1", "'_", ",_", "'", "1.1", ".1", ".1", "'_", ",_", "self_", "._", "\\u", "GATEWAY", "_", ",_", "'", "8.8", ".8", ".8", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "default", "\\u", "gateway_", "(_", "routin", "g", "\\u", "table_", "=_", "routin", "g", "\\u", "table_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "check", "\\u", "static", "\\u", "route", "\\u", "exists_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "routin", "g", "\\u", "table_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", "._", "return", "\\u", "value_", "=_", "[_", "routin", "g", "\\u", "table_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "check", "\\u", "static", "\\u", "route", "\\u", "exists_", "(_", "self_", "._", "\\u", "DEST", "INATION", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "routin", "g", "\\u", "table_", "[_", "0_", "]_", "==_", "self_", "._", "\\u", "DEST", "INATION", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "False_", "(_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "static", "\\u", "route", "\\u", "exist", "s", "\\u", "true_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "routin", "g", "\\u", "table_", "=_", "[_", "self_", "._", "\\u", "DEST", "INATION", "_", ",_", "'", "1.1", ".1", ".1", "'_", ",_", "self_", "._", "\\u", "GATEWAY", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "8.8", ".8", ".8", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "check", "\\u", "static", "\\u", "route", "\\u", "exists_", "(_", "routin", "g", "\\u", "table_", "=_", "routin", "g", "\\u", "table_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "static", "\\u", "route", "\\u", "exist", "s", "\\u", "false_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "routin", "g", "\\u", "table_", "=_", "[_", "'", "0.", "0.", "0.", "0", "'_", ",_", "'", "1.1", ".1", ".1", "'_", ",_", "self_", "._", "\\u", "GATEWAY", "_", ",_", "'", "8.8", ".8", ".8", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "check", "\\u", "static", "\\u", "route", "\\u", "exists_", "(_", "routin", "g", "\\u", "table_", "=_", "routin", "g", "\\u", "table_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".", "execute", "\\u", "process", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "add", "\\u", "static", "\\u", "route_", "(_", "self_", ",_", "mock", "\\u", "execute", "\\u", "process_", ",_", "err_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "next", "\\u", "hop_", "=_", "'", "10.1", "0.10", ".1", "0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "interface", "\\u", "index_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "metric_", "=_", "9_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "=_", "[_", "'", "ROUTE", "'_", ",_", "'", "ADD", "'_", ",_", "self_", "._", "\\u", "DEST", "INATION", "_", ",_", "'", "MASK", "'_", ",_", "self_", "._", "\\u", "NET", "MASK_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "next", "\\u", "hop_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "return", "\\u", "value_", "=_", "(_", "None_", ",_", "err_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "err_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "add", "\\u", "static", "\\u", "route_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "DEST", "INATION", "_", ",_", "self_", "._", "\\u", "NET", "MASK_", ",_", "next", "\\u", "hop_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "index_", ",_", "metric_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "add", "\\u", "static", "\\u", "route_", "(_", "self_", "._", "\\u", "DEST", "INATION", "_", ",_", "self_", "._", "\\u", "NET", "MASK_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "next", "\\u", "hop_", ",_", "interface", "\\u", "index_", ",_", "metric_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "static", "\\u", "route_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "static", "\\u", "route_", "(_", "err_", "=_", "404_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "\\u", "static", "\\u", "route", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "add", "\\u", "static", "\\u", "route_", "(_", "err_", "=_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "check", "\\u", "os", "\\u", "version_", "(_", "self_", ",_", "ret", "\\u", "val_", "=_", "None_", ",_", "fail_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "params_", "=_", "(_", "3_", ",_", "1_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "version", "\\u", "info_", "=_", "self_", "._", "\\u", "nt", "dll_", "._", "Rt", "l", "Verify", "Version", "Info_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "version", "\\u", "info_", "._", "return", "\\u", "value_", "=_", "ret", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mask_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "condition", "\\u", "mask_", "=_", "self_", "._", "\\u", "kernel32_", "._", "Ver", "Set", "Cond", "ition", "Mask_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "condition", "\\u", "mask_", "._", "return", "\\u", "value_", "=_", "mask_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ver", "\\u", "constants_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "VER", "\\u", "MAJOR", "VERSION_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "VER", "\\u", "MINOR", "VERSION_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "VER", "\\u", "BUILD", "NUMBER_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "check", "\\u", "os", "\\u", "version_", "(_", "*_", "params_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "os", "version", "\\u", "struct_", "=_", "self_", "._", "windows", "\\u", "utils_", "._", "Win", "32", "\\u", "OS", "VERSI", "ONI", "NF", "OE", "X", "\\u", "W_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "os", "version", "\\u", "struct_", "._", "return", "\\u", "value_", "=_", "os", "version", "\\u", "struct_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "os", "version", "\\u", "struct_", "._", "side", "\\u", "effect_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "vi_", "=_", "os", "version", "\\u", "struct_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mask", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "0_", ",_", "ver", "\\u", "constants_", "[_", "0_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "VER", "\\u", "GRE", "ATE", "R", "\\u", "EQUAL", "_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "mask_", ",_", "ver", "\\u", "constants_", "[_", "1_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "VER", "\\u", "GRE", "ATE", "R", "\\u", "EQUAL", "_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "mask_", ",_", "ver", "\\u", "constants_", "[_", "2_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "VER", "\\u", "GRE", "ATE", "R", "\\u", "EQUAL", "_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "check", "\\u", "os", "\\u", "version_", "(_", "*_", "params_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "sizeof_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "os", "version", "\\u", "struct_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "condition", "\\u", "mask_", "._", "assert", "\\u", "has", "\\u", "calls_", "(_", "mask", "\\u", "calls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "type", "\\u", "mask_", "=_", "ver", "\\u", "constants_", "[_", "0_", "]_", "|_", "ver", "\\u", "constants_", "[_", "1_", "]_", "|_", "ver", "\\u", "constants_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "vi_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "version", "\\u", "info_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "type", "\\u", "mask_", ",_", "mask_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "expect_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "ret", "\\u", "val_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expect_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "ret", "\\u", "val_", "==_", "self_", "._", "\\u", "win", "utils_", "._", "STATUS", "\\u", "REVISION", "\\u", "MIS", "MATCH_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expect_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expect_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "os", "\\u", "version", "\\u", "pass_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "os", "\\u", "version_", "(_", "ret", "\\u", "val_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "os", "\\u", "version", "\\u", "no", "\\u", "pass_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "os", "\\u", "version_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "val_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "STATUS", "\\u", "REVISION", "\\u", "MIS", "MATCH_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "os", "\\u", "version", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "os", "\\u", "version_", "(_", "ret", "\\u", "val_", "=_", "mock_", "._", "Mock_", "(_", ")_", ",_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "volume", "\\u", "label_", "(_", "self_", ",_", "ret", "\\u", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "label_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "max", "\\u", "label", "\\u", "size_", "=_", "261_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "drive_", "=_", "'", "Fake", "\\u", "drive", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "return", "\\u", "value_", "=_", "label_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "._", "Get", "Volume", "Information", "W_", "._", "return", "\\u", "value_", "=_", "ret", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "volume", "\\u", "label_", "(_", "drive_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "response_", "is_", "not_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "response_", "is_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "max", "\\u", "label", "\\u", "size_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "._", "Get", "Volume", "Information", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "drive_", ",_", "label_", ",_", "max", "\\u", "label", "\\u", "size_", ",_", "0_", ",_", "0_", ",_", "0_", ",_", "0_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "volume", "\\u", "label_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "volume", "\\u", "label_", "(_", "'", "ret", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "volume", "\\u", "label", "\\u", "no", "\\u", "return", "\\u", "value_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "volume", "\\u", "label_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "re", ".", "search", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "base", ".", "Base", "OS", "Ut", "il", "s", ".'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "generat", "e\\u", "random", "\\u", "password", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "generat", "e\\u", "random", "\\u", "password_", "(_", "self_", ",_", "mock", "\\u", "generat", "e\\u", "random", "\\u", "password_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "search_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "length_", "=_", "14_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "search_", "._", "return", "\\u", "value_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "generat", "e\\u", "random", "\\u", "password_", "._", "return", "\\u", "value_", "=_", "'", "Passw", "0", "rd", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "generat", "e\\u", "random", "\\u", "password_", "(_", "length_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "generat", "e\\u", "random", "\\u", "password_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "length_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "Passw", "0", "rd", "'_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "logical", "\\u", "drives", "_", "(_", "self_", ",_", "buf", "\\u", "length_", ",_", "last", "\\u", "error_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "buf_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "buf_", "._", "\\u\\u", "getitem\\u\\u_", "._", "side", "\\u", "effect_", "=_", "[_", "'", "1", "'_", ",_", "'\\\\", "x0", "0", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "drives", "_", "=_", "self_", "._", "\\u", "wind", "ll", "\\u", "mock_", "._", "kernel32_", "._", "Get", "Logi", "cal", "Drive", "String", "s", "W_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "buf_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "drives", "_", "._", "return", "\\u", "value_", "=_", "buf", "\\u", "length_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "buf", "\\u", "length_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Get", "Logi", "cal", "Drive", "String", "s", "W", " ", "fail", "ed", ":", " ", "%", "r", "\"_", ",_", "last", "\\u", "error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "logical", "\\u", "drives", "_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "logical", "\\u", "drives", "_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "261_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "drives", "_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "260_", ",_", "mock", "\\u", "buf_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "'", "1", "'_", "]_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "logical", "\\u", "drives", "\\u", "exception_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "logical", "\\u", "drives", "_", "(_", "buf", "\\u", "length_", "=_", "None_", ",_", "last", "\\u", "error_", "=_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "logical", "\\u", "drives", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "logical", "\\u", "drives", "_", "(_", "buf", "\\u", "length_", "=_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".'_", "\\u\\u\\uNL\\u\\u\\u_", "'\\u", "get", "\\u", "logical", "\\u", "drives", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "kernel", "32", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "cdrom", "\\u", "drives", "_", "(_", "self_", ",_", "mock", "\\u", "kernel32_", ",_", "mock", "\\u", "get", "\\u", "logical", "\\u", "drives", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "logical", "\\u", "drives", "_", "._", "return", "\\u", "value_", "=_", "[_", "'", "drive", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "kernel32_", "._", "Get", "Drive", "Type", "W_", "._", "return", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "DRI", "VE", "\\u", "CD", "ROM", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "cdrom", "\\u", "drives", "_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "logical", "\\u", "drives", "_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "'", "drive", "'_", "]_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "msvcrt", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "kernel", "32", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "setup", "api", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Win", "32", "\\u", "STOR", "AGE", "\\u", "DEV", "ICE", "\\u", "NUMB", "ER", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "self_", ",_", "mock", "\\u", "sdn", "_", ",_", "mock", "\\u", "setup", "api_", ",_", "mock", "\\u", "kernel32_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "msvcrt", "_", ",_", "handle", "\\u", "disks_", ",_", "last", "\\u", "error_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "detail_", ",_", "disk", "\\u", "handle_", ",_", "io", "\\u", "control_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error", "\\u", "code_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "size", "of", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Win", "32", "\\u", "SP", "\\u", "DEV", "ICE", "\\u", "INTERFACE", "\\u", "DATA_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Win", "32", "\\u", "SP", "\\u", "DEV", "ICE", "\\u", "INTERFACE", "\\u", "DETAIL", "\\u", "DATA", "\\u", "W_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "mock", "\\u", "sdn", "_", "(_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "device", "\\u", "interface", "s", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", ",_", "None_", ",_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "handle", "\\u", "disks_", ",_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "device", "\\u", "path_", "=_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", "._", "contents_", "._", "Dev", "ice", "Path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cast", "\\u", "calls_", "=_", "[_", "mock_", "._", "call_", "(_", "mock", "\\u", "msvcrt", "_", "._", "malloc", "_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "POINTER_", "._", "return", "\\u", "value_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "device", "\\u", "path_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "LP", "WS", "TR_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "setup", "\\u", "interface_", "=_", "mock", "\\u", "setup", "api_", "._", "Set", "up", "Di", "Get", "Dev", "ice", "Interface", "Det", "ail", "W_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "setup", "api_", "._", "Set", "up", "Di", "Get", "Class", "Dev", "s", "W_", "._", "return", "\\u", "value_", "=_", "handle", "\\u", "disks_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "kernel32_", "._", "Get", "Las", "t", "Error_", "._", "return", "\\u", "value_", "=_", "last", "\\u", "error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "setup", "\\u", "interface_", "._", "return", "\\u", "value_", "=_", "interface", "\\u", "detail_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "kernel32_", "._", "Creat", "e", "File", "W_", "._", "return", "\\u", "value_", "=_", "disk", "\\u", "handle_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "kernel32_", "._", "Dev", "ice", "Io", "Control_", "._", "return", "\\u", "value_", "=_", "io", "\\u", "control_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "setup", "api_", "._", "Set", "up", "Di", "Enum", "Dev", "ice", "Interface", "s_", "._", "side", "\\u", "effect_", "=_", "[_", "True_", ",_", "False_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "handle", "\\u", "disks_", "==_", "self_", "._", "\\u", "win", "utils_", "._", "INVALID", "\\u", "HANDLE", "\\u", "VALUE_", "or_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "!=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ")_", "and_", "not_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "detail_", ")_", "or_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", "==_", "self_", "._", "\\u", "win", "utils_", "._", "INVALID", "\\u", "HANDLE", "\\u", "VALUE_", ")_", "or_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "not_", "io", "\\u", "control_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "io", "\\u", "control_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Dev", "ice", "Io", "Control", " ", "fail", "ed", ":", " ", "%", "r", "\"_", ",_", "last", "\\u", "error", "\\u", "code_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "physical", "\\u", "disks_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "not_", "interface", "\\u", "detail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "\\u", "raise", "s", "\\u", "windows", "\\u", "message_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Set", "up", "Di", "Get", "Dev", "ice", "Interface", "Det", "ail", "W", " ", "fail", "ed", ":", " ", "%", "r", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error", "\\u", "code_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "physical", "\\u", "disks_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "physical", "\\u", "disks_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "physical", "\\u", "disks_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "size", "of", "\\u", "calls_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "sizeof_", "._", "call", "\\u", "args", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "device", "\\u", "interface", "s", "\\u", "calls_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "setup", "api_", "._", "Set", "up", "Di", "Enum", "Dev", "ice", "Interface", "s_", "._", "call", "\\u", "args", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "interface", "\\u", "detail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "kernel32_", "._", "Get", "Las", "t", "Error_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "POINTER_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Win", "32", "\\u", "SP", "\\u", "DEV", "ICE", "\\u", "INTERFACE", "\\u", "DETAIL", "\\u", "DATA", "\\u", "W_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "msvcrt", "_", "._", "malloc", "_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "c\\u", "size", "\\u", "t_", "._", "return", "\\u", "value_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "cast", "\\u", "calls_", ",_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "call", "\\u", "args", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "setup", "\\u", "interface_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", ",_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "wintype", "s", "\\u", "mock_", "._", "DWORD_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "None_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "kernel32_", "._", "Creat", "e", "File", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", "._", "value_", ",_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "FILE", "\\u", "SHAR", "E", "\\u", "READ_", ",_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "OPEN", "\\u", "EXIST", "ING_", ",_", "0_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "sdn", "_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "kernel32_", "._", "Dev", "ice", "Io", "Control_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", ",_", "self_", "._", "\\u", "win", "utils_", "._", "IOC", "TL", "\\u", "STOR", "AGE", "\\u", "GET", "\\u", "DEV", "ICE", "\\u", "NUMBER_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "None_", ",_", "0_", ",_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "sizeof_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "\"\\\\\\\\\\\\", "\\\\.\\\\", "PHYS", "ICAL", "DRI", "VE", "1", "\"_", "]_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "setup", "api_", "._", "Set", "up", "Di", "Destr", "oy", "Dev", "ice", "Info", "List_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "setup", "api_", "._", "Set", "up", "Di", "Get", "Class", "Dev", "s", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "None_", ",_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "DIG", "CF", "\\u", "PRESENT", "_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "DIG", "CF", "\\u", "DEV", "ICE", "INTERFACE_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "handle", "\\u", "disks_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "disk", "\\u", "handle_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", "=_", "mock", "\\u", "handle", "\\u", "disks_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "detail_", "=_", "'", "fake", " ", "interface", " ", "deta", "il", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", "=_", "mock", "\\u", "disk", "\\u", "handle_", ",_", "io", "\\u", "control_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "physical", "\\u", "disks", "\\u", "other", "\\u", "error", "\\u", "and", "\\u", "no", "\\u", "interface", "\\u", "detail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "handle", "\\u", "disks_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "disk", "\\u", "handle_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", "=_", "mock", "\\u", "handle", "\\u", "disks_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "'", "other", "'_", ",_", "interface", "\\u", "detail_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error", "\\u", "code_", "=_", "100_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", "=_", "mock", "\\u", "disk", "\\u", "handle_", ",_", "io", "\\u", "control_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "physical", "\\u", "disks", "\\u", "invalid", "\\u", "disk", "\\u", "handle_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "handle", "\\u", "disks_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", "=_", "mock", "\\u", "handle", "\\u", "disks_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "detail_", "=_", "'", "fake", " ", "interface", " ", "deta", "il", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "INVALID", "\\u", "HANDLE", "\\u", "VALUE_", ",_", "io", "\\u", "control_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "physical", "\\u", "disks", "\\u", "io", "\\u", "control_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "handle", "\\u", "disks_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "disk", "\\u", "handle_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", "=_", "mock", "\\u", "handle", "\\u", "disks_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "detail_", "=_", "'", "fake", " ", "interface", " ", "deta", "il", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error", "\\u", "code_", "=_", "100_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", "=_", "mock", "\\u", "disk", "\\u", "handle_", ",_", "io", "\\u", "control_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "physical", "\\u", "disks", "\\u", "handle", "\\u", "disks", "\\u", "invalid_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "disk", "\\u", "handle_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "physical", "\\u", "disks_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "handle", "\\u", "disks_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "INVALID", "\\u", "HANDLE", "\\u", "VALUE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "last", "\\u", "error_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "interface", "\\u", "detail_", "=_", "'", "fake", " ", "interface", " ", "deta", "il", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "disk", "\\u", "handle_", "=_", "mock", "\\u", "disk", "\\u", "handle_", ",_", "io", "\\u", "control_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "volumes_", "(_", "self_", ",_", "find", "\\u", "first_", "=_", "True_", ",_", "find", "\\u", "next_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "count_", "=_", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "expected", "\\u", "volumes_", "=_", "[_", "\"", "ID", "\\u{}", "\"_", "._", "format_", "(_", "idx_", ")_", "for_", "idx_", "in_", "range_", "(_", "count_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "volume", "\\u", "values_", "=_", "mock_", "._", "Proper", "ty", "Mock_", "(_", "side", "\\u", "effect_", "=_", "expected", "\\u", "volumes_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "volume_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "type_", "(_", "mock", "\\u", "volume_", ")_", "._", "value_", "=_", "volume", "\\u", "values_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "create", "\\u", "unicode", "\\u", "buffer_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "volume_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "find", "\\u", "first_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Fi", "rst", "Volume", "W_", "._", "return", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "INVALID", "\\u", "HANDLE", "\\u", "VALUE_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "side", "\\u", "effects_", "=_", "[_", "1_", "]_", "*_", "(_", "count_", "-_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "side", "\\u", "effects_", "._", "append_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Ne", "xt", "Volume", "W_", "._", "side", "\\u", "effect_", "=_", "side", "\\u", "effects_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "find", "\\u", "next_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "Get", "Las", "t", "Error_", "._", "return", "\\u", "value_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "NO", "\\u", "MOR", "E", "\\u", "FILES_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "(_", "find", "\\u", "first_", "and_", "find", "\\u", "next_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Window", "s", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "volumes_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "volumes_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "volumes_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Fi", "rst", "Volume", "W_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "volume_", ",_", "self_", "._", "\\u", "win", "utils_", "._", "MAX", "\\u", "PATH_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "find", "\\u", "next", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Fi", "rst", "Volume", "W_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "volume_", ",_", "self_", "._", "\\u", "win", "utils_", "._", "MAX", "\\u", "PATH_", ")_", "]_", "*_", "count_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Ne", "xt", "Volume", "W_", "._", "assert", "\\u", "has", "\\u", "calls_", "(_", "find", "\\u", "next", "\\u", "calls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Volume", "Close_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Fin", "d", "Fi", "rst", "Volume", "W_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "volumes_", ",_", "volumes_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "volumes_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "volumes_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "volume", "s", "\\u", "first", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "volumes_", "(_", "find", "\\u", "first_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "volume", "s", "\\u", "next", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "get", "\\u", "volumes_", "(_", "find", "\\u", "next_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".\\u", "get", "\\u", "fw", "\\u", "protoc", "ol", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "firew", "all", "\\u", "create", "\\u", "rule_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "fw", "\\u", "protocol_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expected_", "=_", "[_", "mock_", "._", "call_", "(_", "\"", "HN", "et", "Cf", "g", ".", "FW", "Open", "Port", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "\"", "HN", "et", "Cf", "g", ".", "Fw", "Mgr", "\"_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "firew", "all", "\\u", "create", "\\u", "rule_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "name_", "=_", "'", "fake", " ", "name", "'_", ",_", "port_", "=_", "9999_", ",_", "protocol_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "PROTOCOL", "\\u", "TCP_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected_", ",_", "self_", "._", "\\u", "client", "\\u", "mock_", "._", "Dispa", "tch_", "._", "call", "\\u", "args", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "fw", "\\u", "protocol_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "PROTOCOL", "\\u", "TCP_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".\\u", "get", "\\u", "fw", "\\u", "protoc", "ol", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "firew", "all", "\\u", "remove", "\\u", "rule_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "fw", "\\u", "protocol_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "firew", "all", "\\u", "remove", "\\u", "rule_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "name_", "=_", "'", "fake", " ", "name", "'_", ",_", "port_", "=_", "9999_", ",_", "protocol_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "PROTOCOL", "\\u", "TCP_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "client", "\\u", "mock_", "._", "Dispa", "tch_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\"", "HN", "et", "Cf", "g", ".", "Fw", "Mgr", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "fw", "\\u", "protocol_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "PROTOCOL", "\\u", "TCP_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "os", ".", "path", ".", "expand", "vars", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "system", "32", "\\u", "dir_", "(_", "self_", ",_", "mock", "\\u", "expand", "vars_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "\"", "system", "32", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "expand", "vars_", "._", "return", "\\u", "value_", "=_", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "system", "32", "\\u", "dir_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "expand", "vars_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "'%", "wind", "ir", "%\\", "\\\\", "\\", "{}'_", "._", "format_", "(_", "path_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "path_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "os", ".", "path", ".", "expand", "vars", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "sys", "wo", "w", "64", "\\u", "dir_", "(_", "self_", ",_", "mock", "\\u", "expand", "vars_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "\"", "sys", "wo", "w", "64", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "expand", "vars_", "._", "return", "\\u", "value_", "=_", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "sys", "wo", "w", "64", "\\u", "dir_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "expand", "vars_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "'%", "wind", "ir", "%\\", "\\\\", "\\", "{}'_", "._", "format_", "(_", "path_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "path_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "os", ".", "path", ".", "expand", "vars", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "(_", "self_", ",_", "mock", "\\u", "expand", "vars_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "\"", "sys", "nativ", "e", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "expand", "vars_", "._", "return", "\\u", "value_", "=_", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "expand", "vars_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "'%", "wind", "ir", "%\\", "\\\\", "\\", "{}'_", "._", "format_", "(_", "path_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "path_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "is", "\\u", "wo", "w", "64", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "sys", "nativ", "e\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "os", ".", "path", ".", "isdi", "r", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "(_", "self_", ",_", "mock", "\\u", "isdir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "is", "\\u", "wo", "w", "64_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "exists_", "=_", "True_", ",_", "wo", "w", "64_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "._", "return", "\\u", "value_", "=_", "'", "fake", "\\u", "sys", "nativ", "e", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "isdir_", "._", "return", "\\u", "value_", "=_", "exists_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "is", "\\u", "wo", "w", "64_", "._", "return", "\\u", "value_", "=_", "wo", "w", "64_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "expected", "\\u", "log_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "exists_", "and_", "wo", "w", "64_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expected", "\\u", "log_", "=_", "[_", "'", "Una", "ble", " ", "to", " ", "validat", "e", " ", "sys", "nativ", "e", " ", "folder", " ", "presen", "ce", ".", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "If", " ", "Target", " ", "OS", " ", "is", " ", "Server", " ", "2003", " ", "x6", "4", ",", " ", "plea", "se", " ", "ensure", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "you", " ", "have", " ", "KB", "942", "589", " ", "install", "ed", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "log_", ",_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "exists_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "doe", "s", "\\u", "not", "\\u", "exist_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "(_", "exists_", "=_", "False_", ",_", "wo", "w", "64_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exist", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "sys", "nativ", "e\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "is", "\\u", "64", "bit", "\\u", "arch", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "sys", "wo", "w", "64", "\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "system", "32", "\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "wo", "w", "64", "\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "is", "\\u", "64", "bit", "\\u", "arch_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sys", "native_", ",_", "arche", "s_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "settings_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "._", "return", "\\u", "value_", "=_", "\"", "system", "32", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "wo", "w", "64", "\\u", "dir_", "._", "return", "\\u", "value_", "=_", "\"", "sys", "wo", "w", "64", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "._", "return", "\\u", "value_", "=_", "\"", "sys", "nativ", "e", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "is", "\\u", "64", "bit", "\\u", "arch_", "._", "return", "\\u", "value_", "=_", "arche", "s_", "._", "startswith_", "(_", "\"", "64", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "._", "return", "\\u", "value_", "=_", "(_", "arche", "s_", "==_", "\"", "32", "on", "64", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "expect", "\\u", "dict_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "32", "on", "32", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "False_", ":_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "system", "32", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "mock", "\\u", "is", "\\u", "64", "bit", "\\u", "arch_", ",_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "True_", ":_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "system", "32", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "32", "on", "64", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "False_", ":_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "system", "32", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "mock", "\\u", "is", "\\u", "64", "bit", "\\u", "arch_", ",_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "True_", ":_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "sys", "nativ", "e", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "64", "on", "64", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "False_", ":_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "sys", "wo", "w", "64", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "mock", "\\u", "is", "\\u", "64", "bit", "\\u", "arch_", ",_", "mock", "\\u", "get", "\\u", "sys", "wo", "w", "64", "\\u", "dir_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "True_", ":_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "system", "32", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "actions_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "sys", "native_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "expect_", ",_", "calls_", "=_", "expect", "\\u", "dict_", "[_", "arche", "s_", "]_", "[_", "sys", "native_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expect_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "call_", "in_", "calls_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "call_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "system", "\\u", "dir\\u", "32", "on", "32_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "arche", "s_", "=_", "\"", "32", "on", "32", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "False_", ",_", "arche", "s_", "=_", "arche", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "True_", ",_", "arche", "s_", "=_", "arche", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "system", "\\u", "dir\\u", "32", "on", "64_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "arche", "s_", "=_", "\"", "32", "on", "64", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "False_", ",_", "arche", "s_", "=_", "arche", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "True_", ",_", "arche", "s_", "=_", "arche", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "system", "\\u", "dir\\u", "64", "on", "64_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "arche", "s_", "=_", "\"", "64", "on", "64", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "False_", ",_", "arche", "s_", "=_", "arche", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "get", "\\u", "system", "\\u", "dir_", "(_", "sys", "native_", "=_", "True_", ",_", "arche", "s_", "=_", "arche", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "check", "\\u", "server", "\\u", "level", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "is", "\\u", "nano", "\\u", "server_", "(_", "self_", ",_", "mock", "\\u", "check", "\\u", "server", "\\u", "level_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "expect_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "check", "\\u", "server", "\\u", "level_", "._", "return", "\\u", "value_", "=_", "expect_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "is", "\\u", "nano", "\\u", "server_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "check", "\\u", "server", "\\u", "level_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\"", "Nano", "Server", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expect_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "check", "\\u", "server", "\\u", "level_", "(_", "self_", ",_", "fail_", "=_", "False_", ",_", "success_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "server", "\\u", "level_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "open", "\\u", "key_", "=_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "success_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ecl", "ass_", "=_", "Exception_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "error_", "=_", "ecl", "ass_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Window", "s", "Error_", "=_", "ecl", "ass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "open", "\\u", "key_", "._", "side", "\\u", "effect_", "=_", "[_", "error_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "Raises_", "(_", "ecl", "ass_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "check", "\\u", "server", "\\u", "level_", "(_", "server", "\\u", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "error_", "._", "wine", "rror_", "=_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "check", "\\u", "server", "\\u", "level_", "(_", "server", "\\u", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "False_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "used", "\\u", "hive", "_", ",_", "self_", "._", "used", "\\u", "path_", "=_", "None_", ",_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "key_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "contextlib_", "._", "contextmanager_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "open", "\\u", "key", "\\u", "context_", "(_", "hive", "_", ",_", "path_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "used", "\\u", "hive", "_", ",_", "self_", "._", "used", "\\u", "path_", "=_", "hive", "_", ",_", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "yield_", "mock", "\\u", "key_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Open", "Key_", "=_", "open", "\\u", "key", "\\u", "context_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "return", "\\u", "value_", "=_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "check", "\\u", "server", "\\u", "level_", "(_", "server", "\\u", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "HKEY", "\\u", "LOCAL", "\\u", "MACHINE", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "used", "\\u", "hive", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "\"", "Sof", "twa", "re", "\\\\\\\\", "Micro", "soft", "\\\\\\\\", "Window", "s", " ", "NT", "\\\\\\\\\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Curr", "ent", "Version", "\\\\\\\\", "Server", "\\\\\\\\", "Server", "Levels", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "used", "\\u", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "winr", "eg", "\\u", "mock_", "._", "Query", "Value", "Ex_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "key_", ",_", "server", "\\u", "level_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "True_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "server", "\\u", "level", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "server", "\\u", "level_", "(_", "fail_", "=_", "True_", ",_", "success_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "server", "\\u", "level", "\\u", "no", "\\u", "success_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "server", "\\u", "level_", "(_", "fail_", "=_", "False_", ",_", "success_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "check", "\\u", "server", "\\u", "level", "\\u", "success_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "check", "\\u", "server", "\\u", "level_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "is", "\\u", "nano", "\\u", "server", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exist", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "sys", "nativ", "e\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "system", "32", "\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "execute", "\\u", "process", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script_", "(_", "self_", ",_", "mock", "\\u", "execute", "\\u", "process_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "is", "\\u", "nano", "\\u", "server_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "val_", "=_", "None_", ",_", "nano", "_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "._", "return", "\\u", "value_", "=_", "ret", "\\u", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "is", "\\u", "nano", "\\u", "server_", "._", "return", "\\u", "value_", "=_", "nano", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "._", "return", "\\u", "value_", "=_", "'", "fake", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "._", "return", "\\u", "value_", "=_", "'", "fake", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fake", "\\u", "path_", "=_", "os_", "._", "path_", "._", "join_", "(_", "'", "fake", "'_", ",_", "'", "Window", "s", "Power", "Shel", "l", "\\\\\\\\", "v1", ".0", "\\\\\\\\'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "powers", "hell", ".", "exe", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "=_", "[_", "fake", "\\u", "path_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "nano", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "extend_", "(_", "[_", "'-", "Execut", "ion", "Polic", "y", "'_", ",_", "'", "Remo", "te", "Signe", "d", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'-", "Non", "Interact", "ive", "'_", ",_", "'-", "File", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "args_", "._", "append_", "(_", "'", "fake", "\\u", "script", "\\u", "path", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "execute", "\\u", "powers", "hell", "\\u", "script_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "script", "\\u", "path_", "=_", "'", "fake", "\\u", "script", "\\u", "path", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "args_", ",_", "shell_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "mock", "\\u", "execute", "\\u", "process_", "._", "return", "\\u", "value_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script", "\\u", "sys", "native_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script_", "(_", "ret", "\\u", "val_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script", "\\u", "system", "32_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script_", "(_", "ret", "\\u", "val_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script", "\\u", "sys", "nativ", "e\\u", "nano", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "execute", "\\u", "powers", "hell", "\\u", "script_", "(_", "ret", "\\u", "val_", "=_", "True_", ",_", "nano", "_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "util", "s", ".", "windows", ".", "network", ".", "get", "\\u", "adapter", "\\u", "addresse", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "dhcp", "\\u", "host", "s", "\\u", "in", "\\u", "use_", "(_", "self_", ",_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "net", "\\u", "addr_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net", "\\u", "addr_", "[_", "\"", "mac", "\\u", "address", "\"_", "]_", "=_", "'", "fake", " ", "mac", " ", "address", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net", "\\u", "addr_", "[_", "\"", "dhcp", "\\u", "server", "\"_", "]_", "=_", "'", "fake", " ", "dhcp", " ", "server", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net", "\\u", "addr_", "[_", "\"", "dhcp", "\\u", "enable", "d", "\"_", "]_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "return", "\\u", "value_", "=_", "[_", "net", "\\u", "addr_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "dhcp", "\\u", "host", "s", "\\u", "in", "\\u", "use_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "[_", "(_", "'", "fake", " ", "mac", " ", "address", "'_", ",_", "'", "fake", " ", "dhcp", " ", "server", "'_", ")_", "]_", ",_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exist", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "sys", "nativ", "e\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "get", "\\u", "system", "32", "\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "execute", "\\u", "process", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config_", "(_", "self_", ",_", "mock", "\\u", "execute", "\\u", "process_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sys", "native_", ",_", "ret", "\\u", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fake", "\\u", "base", "\\u", "dir_", "=_", "'", "fake", "\\u", "dir", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ntp", "\\u", "hosts_", "=_", "[_", "\"", "first", "\"_", ",_", "\"", "second", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "sys", "nativ", "e\\u", "dir\\u", "exists_", "._", "return", "\\u", "value_", "=_", "sys", "native_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "return", "\\u", "value_", "=_", "(_", "None_", ",_", "None_", ",_", "ret", "\\u", "val_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w3", "2t", "m", "\\u", "path_", "=_", "os_", "._", "path_", "._", "join_", "(_", "fake", "\\u", "base", "\\u", "dir_", ",_", "\"", "w3", "2t", "m", ".", "exe", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "._", "return", "\\u", "value_", "=_", "fake", "\\u", "base", "\\u", "dir_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "._", "return", "\\u", "value_", "=_", "fake", "\\u", "base", "\\u", "dir_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "args_", "=_", "[_", "w3", "2t", "m", "\\u", "path_", ",_", "'/", "config", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'/", "manu", "alp", "eer", "list", ":", "%", "s", "'_", "%_", "\",\"_", "._", "join_", "(_", "ntp", "\\u", "hosts_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'/", "sync", "from", "flags", ":", "manu", "al", "'_", ",_", "'/", "update", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ret", "\\u", "val_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "ntp", "\\u", "client", "\\u", "config_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "fake", " ", "ntp", " ", "host", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "ntp", "\\u", "client", "\\u", "config_", "(_", "ntp", "\\u", "hosts_", "=_", "ntp", "\\u", "hosts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "sys", "native_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "sys", "nativ", "e\\u", "dir_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "system", "32", "\\u", "dir_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "args_", ",_", "shell_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config", "\\u", "sys", "nativ", "e\\u", "true_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config_", "(_", "sys", "native_", "=_", "True_", ",_", "ret", "\\u", "val_", "=_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config", "\\u", "sys", "nativ", "e\\u", "false_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config_", "(_", "sys", "native_", "=_", "False_", ",_", "ret", "\\u", "val_", "=_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config", "\\u", "sys", "nativ", "e\\u", "exception_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "ntp", "\\u", "client", "\\u", "config_", "(_", "sys", "native_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ret", "\\u", "val_", "=_", "'", "fake", " ", "return", " ", "value", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "execute", "\\u", "process", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "\\u", "get", "\\u", "system", "\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "\"", "cloudb", "ase", "init", ".", "util", "s", ".", "windows", ".", "network", ".\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "get", "\\u", "adapter", "\\u", "addresse", "s", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'.", "check", "\\u", "os", "\\u", "version", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "self_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "\\u", "dir_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "fail_", "=_", "False_", ",_", "os", "\\u", "version", "\\u", "ret_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mac", "\\u", "address", "\\u", "match_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "execute", "\\u", "process", "\\u", "val_", "=_", "0_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mac", "\\u", "address_", "=_", "\"", "fake", " ", "mac", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mtu_", "=_", "\"", "fake", " ", "mtu", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "base", "\\u", "dir_", "=_", "\"", "fake", " ", "path", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", "._", "return", "\\u", "value_", "=_", "os", "\\u", "version", "\\u", "ret_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "return", "\\u", "value_", "=_", "[_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "\\u_", "in_", "range_", "(_", "3_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "mac", "\\u", "address", "\\u", "match_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Sam", "e", " ", "as", " ", "`", "ifa", "ce", "\\u", "index", "`", " ", "under", " ", "the", " ", "\"", "interface", "\\u", "index", "\"", " ", "key", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "return", "\\u", "value_", "[_", "1_", "]_", "._", "\\u\\u", "getitem\\u\\u_", "._", "return", "\\u", "value_", "=_", "mac", "\\u", "address_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "\\u", "dir_", "._", "return", "\\u", "value_", "=_", "base", "\\u", "dir_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "return", "\\u", "value_", "=_", "[_", "None_", ",_", "None_", ",_", "execute", "\\u", "process", "\\u", "val_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "mac", "\\u", "address_", ",_", "mtu_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "snat", "cher", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "mac", "\\u", "address_", ",_", "mtu_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "expected", "\\u", "log_", "=_", "[_", "'", "Sett", "ing", " ", "MT", "U", " ", "for", " ", "interface", " ", "\"%", "(", "mac", "\\u", "address", ")", "s", "\"", " ", "with", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "value", " ", "\"%", "(", "mtu", ")", "s", "\"'_", "%_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "mac", "\\u", "address", "'_", ":_", "mac", "\\u", "address_", ",_", "'", "mtu", "'_", ":_", "mtu_", "}_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "=_", "[_", "os_", "._", "path_", "._", "join_", "(_", "base", "\\u", "dir_", ",_", "\"", "nets", "h", ".", "exe", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "interface", "\"_", ",_", "\"", "ipv", "4", "\"_", ",_", "\"", "set", "\"_", ",_", "\"", "subin", "ter", "face", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mac", "\\u", "address_", ",_", "\"", "mtu", "=", "%", "s", "\"_", "%_", "mtu_", ",_", "\"", "store", "=", "persiste", "nt", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "log_", ",_", "self_", "._", "snat", "cher", "_", "._", "output_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "check", "\\u", "os", "\\u", "version_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "6_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "adapter", "\\u", "addresses_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "\\u", "dir_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "args_", ",_", "shell_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu", "\\u", "not", "\\u", "supported_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "fail_", "=_", "True_", ",_", "os", "\\u", "version", "\\u", "ret_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu", "\\u", "no", "\\u", "mac", "\\u", "match_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "fail_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mac", "\\u", "address", "\\u", "match_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu", "\\u", "execute", "\\u", "fail_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "fail_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "execute", "\\u", "process", "\\u", "val_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "set\\u", "network", "\\u", "adapter", "\\u", "mtu_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".'_", "\\u\\u\\uNL\\u\\u\\u_", "'\\u", "get", "\\u", "system", "\\u", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "base", ".", "Base", "OS", "Ut", "il", "s", ".'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "execute", "\\u", "process", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "execute", "\\u", "system", "32", "\\u", "process_", "(_", "self_", ",_", "mock", "\\u", "execute", "\\u", "process_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "get", "\\u", "system", "\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "get", "\\u", "system", "\\u", "dir_", "._", "return", "\\u", "value_", "=_", "'", "base", "\\u", "dir", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "return", "\\u", "value_", "=_", "mock_", "._", "sentinel_", "._", "execute", "\\u", "process_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "=_", "[_", "'", "command", "'_", ",_", "'", "argu", "ment", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "execute", "\\u", "system", "32", "\\u", "process_", "(_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "execute", "\\u", "process_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "os_", "._", "path_", "._", "join_", "(_", "'", "base", "\\u", "dir", "'_", ",_", "args_", "[_", "0_", "]_", ")_", "]_", "+_", "args_", "[_", "1_", ":_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "decode", "\\u", "output_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "shell_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "mock_", "._", "sentinel_", "._", "execute", "\\u", "process_", ",_", "result_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "password", "\\u", "maxim", "um", "\\u", "length_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "20_", ",_", "self_", "._", "\\u", "win", "utils_", "._", "get", "\\u", "maxim", "um", "\\u", "password", "\\u", "length_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "windows", "\\u", "tz", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "set\\u", "timezon", "e\\u", "fails_", "(_", "self_", ",_", "mock", "\\u", "windows", "\\u", "tz_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "windows", "\\u", "tz_", "._", "tz", "\\u", "win_", "._", "get_", "._", "return", "\\u", "value_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", "as_", "cm_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "timezone_", "(_", "mock_", "._", "sentinel_", "._", "timezone_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "expected_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "The", " ", "give", "n", " ", "timezon", "e", " ", "name", " ", "is", " ", "unre", "cogni", "sed", ":", " ", "%", "r", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "%_", "mock_", "._", "sentinel_", "._", "timezone_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected_", ",_", "str_", "(_", "cm_", "._", "exception_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "windows", "\\u", "tz_", "._", "tz", "\\u", "win_", "._", "get_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "timezone_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "timezon", "e", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "windows", "\\u", "tz", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "set\\u", "timezone_", "(_", "self_", ",_", "mock", "\\u", "windows", "\\u", "tz_", ",_", "mock", "\\u", "timezone_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "windows", "\\u", "tz_", "._", "tz", "\\u", "win_", "._", "get_", "._", "return", "\\u", "value_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "windows", "\\u", "timezone_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "set\\u", "timezone_", "(_", "mock_", "._", "sentinel_", "._", "timezone_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "windows", "\\u", "tz_", "._", "tz", "\\u", "win_", "._", "get_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "timezone_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "timezone_", "._", "Timezone", "_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "windows", "\\u", "timezone_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "timezone_", "._", "Timezone", "_", "._", "return", "\\u", "value_", "._", "set_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "\\u", "heap", "\\u", "alloc_", "(_", "self_", ",_", "fail_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "heap_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "size_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "return", "\\u", "value_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", "as_", "cm_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "heap", "\\u", "alloc_", "(_", "mock", "\\u", "heap_", ",_", "mock", "\\u", "size_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "Una", "ble", " ", "to", " ", "allocate", " ", "memory", " ", "for", " ", "the", " ", "IP", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "forward", " ", "table", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "str_", "(_", "cm_", "._", "exception_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "result_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "heap", "\\u", "alloc_", "(_", "mock", "\\u", "heap_", ",_", "mock", "\\u", "size_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "return", "\\u", "value_", ",_", "result_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "heap_", ",_", "0_", ",_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "c\\u", "size", "\\u", "t_", "(_", "mock", "\\u", "size_", "._", "value_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "heap", "\\u", "allo", "c\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "\\u", "heap", "\\u", "alloc_", "(_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "heap", "\\u", "allo", "c\\u", "no", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "test\\u", "\\u", "heap", "\\u", "alloc_", "(_", "fail_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table", "\\u", "no", "\\u", "memory_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "heap", "\\u", "alloc_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "error", "\\u", "msg_", "=_", "'", "Una", "ble", " ", "to", " ", "allocate", " ", "memory", " ", "for", " ", "the", " ", "IP", " ", "forward", " ", "table", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "exc_", "=_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", "(_", "error", "\\u", "msg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "heap", "\\u", "alloc_", "._", "side", "\\u", "effect_", "=_", "exc_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", "as_", "cm_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "error", "\\u", "msg_", ",_", "str_", "(_", "cm_", "._", "exception_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "heap", "\\u", "alloc_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Get", "Process", "Hea", "p_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "wintype", "s_", "._", "ULONG", "_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table", "\\u", "insuf", "ficient", "\\u", "buffer", "\\u", "no", "\\u", "memory_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "side", "\\u", "effect_", "=_", "(_", "mock_", "._", "sentinel_", "._", "table", "\\u", "mem_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Get", "Ip", "Forward", "Table_", "._", "return", "\\u", "value_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "table_", "=_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Get", "Ip", "Forward", "Table_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "table_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "heap", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "self_", "._", "\\u", "kernel32_", "._", "Get", "Process", "Hea", "p_", "._", "return", "\\u", "value_", ",_", "0_", ",_", "table_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "self_", "._", "\\u", "kernel32_", "._", "Get", "Process", "Hea", "p_", "._", "return", "\\u", "value_", ",_", "0_", ",_", "table_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "heap", "\\u", "calls_", ",_", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Free", "_", "._", "mock", "\\u", "calls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", "self_", ",_", "reall", "ocation", "_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "insuf", "ficient", "\\u", "buffer_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "fail_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "fail_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "assert", "Raises_", "(_", "exception_", "._", "Cloud", "base", "Ini", "t", "Exception_", ")_", "as_", "cm_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "msg_", "=_", "(_", "'", "Una", "ble", " ", "to", " ", "get", " ", "IP", " ", "forward", " ", "table", ".", " ", "Error", ":", " ", "%", "s", "'_", "\\u\\u\\uNL\\u\\u\\u_", "%_", "mock_", "._", "sentinel_", "._", "error_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "msg_", ",_", "str_", "(_", "cm_", "._", "exception_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", ")_", "as_", "table_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "pointer_", "=_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "POINTER_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Win", "32", "\\u", "MI", "B", "\\u", "IP", "FORWARD", "TABLE_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "expected", "\\u", "forward", "\\u", "table_", "=_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "return", "\\u", "value_", ",_", "pointer_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "expected", "\\u", "forward", "\\u", "table_", ",_", "table_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "heap", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "self_", "._", "\\u", "kernel32_", "._", "Get", "Process", "Hea", "p_", "._", "return", "\\u", "value_", ",_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "forward", "\\u", "calls_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "call_", "(_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "byref_", "._", "return", "\\u", "value_", ",_", "0_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "insuf", "ficient", "\\u", "buffer_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "We", " ", "expect", " ", "two", " ", "calls", " ", "for", " ", "Get", "Ip", "Forward", "Table_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "forward", "\\u", "calls_", "._", "append_", "(_", "forward", "\\u", "calls_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "reall", "ocation", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "heap", "\\u", "calls_", "._", "append_", "(_", "heap", "\\u", "calls_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "heap", "\\u", "calls_", ",_", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Free", "_", "._", "mock", "\\u", "calls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "forward", "\\u", "calls_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Get", "Ip", "Forward", "Table_", "._", "mock", "\\u", "calls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table", "\\u", "sufficient", "\\u", "buffer_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Get", "Ip", "Forward", "Table_", "._", "return", "\\u", "value_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table", "\\u", "insuf", "ficient", "\\u", "buffer", "\\u", "reall", "ocat", "e_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "side", "\\u", "effect_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "table", "\\u", "mem_", ",_", "mock_", "._", "sentinel_", "._", "table", "\\u", "mem_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Get", "Ip", "Forward", "Table_", "._", "side", "\\u", "effect_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", "reall", "ocation", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "insuf", "ficient", "\\u", "buffer_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table", "\\u", "insuf", "ficient", "\\u", "buffer", "\\u", "other", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "kernel32_", "._", "Hea", "p", "Alloc", "_", "._", "side", "\\u", "effect_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "mock_", "._", "sentinel_", "._", "table", "\\u", "mem_", ",_", "mock_", "._", "sentinel_", "._", "table", "\\u", "mem_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "iph", "lpa", "pi_", "._", "Get", "Ip", "Forward", "Table_", "._", "side", "\\u", "effect_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "win", "utils_", "._", "ERROR", "\\u", "INS", "UFF", "ICI", "ENT", "\\u", "BUFFER_", ",_", "mock_", "._", "sentinel_", "._", "error_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "test\\u", "\\u", "get", "\\u", "forward", "\\u", "table_", "(_", "reall", "ocation", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "insuf", "ficient", "\\u", "buffer_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "fail_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Window", "s", "Utils_", "(_", "testutils_", "._", "Cloud", "base", "Ini", "t", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "mock_", "._", "patch_", "(_", "'", "cloudb", "ase", "init", ".", "osu", "til", "s", ".", "windows", ".", "Window", "s", "Ut", "il", "s", ".'_", "\\u\\u\\uNL\\u\\u\\u_", "'\\u", "get", "\\u", "forward", "\\u", "table", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "routes_", "(_", "self_", ",_", "mock", "\\u", "forward", "\\u", "table_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u", "same_", "(_", "arg_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "arg_", "._", "\\u", "mock", "\\u", "name_", "._", "encode_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "route_", "=_", "mock_", "._", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "cast", "\\u", "result_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "\\u", "cast", "\\u", "result_", "._", "contents_", "=_", "[_", "route_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "ctype", "s", "\\u", "mock_", "._", "cast_", "._", "return", "\\u", "value_", "=_", "mock", "\\u", "cast", "\\u", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "windows", "\\u", "utils_", "._", "Ws", "2", "\\u", "32_", "._", "inet", "\\u", "nto", "a_", "._", "side", "\\u", "effect_", "=_", "\\u", "same_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "route_", "._", "dw", "Forward", "If", "Index_", "=_", "'", "dw", "Forward", "If", "Index", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "route_", "._", "dw", "Forward", "Proto_", "=_", "'", "dw", "Forward", "Proto", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "route_", "._", "dw", "Forward", "Met", "ric", "1_", "=_", "'", "dw", "Forward", "Met", "ric", "1", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "routes_", "=_", "self_", "._", "\\u", "win", "utils_", "._", "\\u", "get", "\\u", "ipv", "4", "\\u", "routin", "g", "\\u", "table_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mock", "\\u", "forward", "\\u", "table_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "enter_", "=_", "mock", "\\u", "forward", "\\u", "table_", "._", "return", "\\u", "value_", "._", "\\u\\u", "enter\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "enter_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "exit", "\\u_", "=_", "mock", "\\u", "forward", "\\u", "table_", "._", "return", "\\u", "value_", "._", "\\u\\u", "exit\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "exit", "\\u_", "._", "assert", "\\u", "call", "ed", "\\u", "onc", "e\\u", "with_", "(_", "None_", ",_", "None_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "1_", ",_", "len_", "(_", "routes_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "give", "n", "\\u", "route_", "=_", "routes_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "dw", "Forward", "Dest", "'_", ",_", "give", "n", "\\u", "route_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "dw", "Forward", "Mask", "'_", ",_", "give", "n", "\\u", "route_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "dw", "Forward", "Ne", "xt", "Hop", "'_", ",_", "give", "n", "\\u", "route_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "dw", "Forward", "If", "Index", "'_", ",_", "give", "n", "\\u", "route_", "[_", "3_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "dw", "Forward", "Met", "ric", "1", "'_", ",_", "give", "n", "\\u", "route_", "[_", "4_", "]_", ")_" ]
[ 4, 4, 4, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Comparison of identical values
ggventurini/python-deltasigma/deltasigma/_logsmooth.py
[ { "content": "def logsmooth(X, inBin, nbin=8, n=3):\n \"\"\"Smooth the FFT and convert it to dB.\n\n **Parameters:**\n\n X : (N,) ndarray\n The FFT data.\n\n inBin : int\n The bin index of the input sine wave (if any).\n\n nbin : int, optional\n The number of bins on which the averaging will be performed,\n used *before* 3*inBin\n\n n : int, optional\n Around the location of the input signal and its harmonics (up to the\n third harmonic), don't average for n bins.\n\n The ``logsmooth`` algorithm uses ``nbin`` bins from 0 to 3*inBin,\n thereafter the bin sizes are increased by a factor 1.1,\n staying less than 2^10.\n\n For the :math:`n` sets of bins:\n :math:`inBin + i, 2*inBin + i ... n*inBin+i`, where :math:`i \\\\in [0,2]`\n don't do averaging. This way, the noise BW\n and the scaling of the tone and its harmonics are unchanged.\n\n .. note::\n\n Unfortunately, harmonics above the nth appear smaller than they\n really are because their energy is averaged over many bins.\n\n **Returns:**\n\n f, p : tuple of 1d-arrays\n The bins and smoothed FFT, expressed in dB.\n\n .. seealso::\n\n * :func:`plotSpectrum`, convenience function to first call\n :func:`logsmooth` and then plot on a logarithmic x-axis its return\n values.\n\n * :func:`circ_smooth`, smoothing algorithm suitable for linear\n x-axis plotting.\n\n .. plot::\n\n import matplotlib.pyplot as plt\n import numpy as np\n from deltasigma import dbv, ds_hann, figureMagic, logsmooth\n T = 2 #s\n Fs = 231e3 #Hz\n N = int(np.round(T*Fs, 0)) # FFT points\n freq = .1e3\n t = np.arange(N)/Fs\n u0 = np.sin(2*np.pi*t*freq)\n u0 = u0 + .01*u0**2+.001*u0**3+.005*u0**4\n U = np.fft.fft(u0 * ds_hann(N))/(N/4)\n f = np.linspace(0, Fs, N + 1)\n f = f[:N/2 + 1]\n plt.subplot(211)\n plt.semilogx(f, dbv(U[:N/2 + 1]))\n plt.hold(True)\n inBin = np.round(freq/Fs*N)\n fS, US = logsmooth(U, inBin)\n plt.semilogx(fS*Fs, US, 'r', linewidth=2.5)\n plt.xlim([f[0]*Fs, Fs/2])\n plt.ylabel('U(f) [dB]')\n figureMagic(xRange=[100, 1e4], yRange=[-400, 0], name='Spectrum')\n plt.subplot(212)\n plt.loglog(fS[1:]*Fs, np.diff(fS*Fs))\n plt.xlabel('f [Hz]')\n plt.ylabel('Averaging interval [Hz]')\n figureMagic(xRange=[100, 1e4])\n plt.show()\n\n \"\"\"\n # preliminary sanitization of the input\n if not np.prod(X.shape) == max(X.shape):\n raise ValueError('Expected a (N,) or (N, 1)-shaped array.')\n if len(X.shape) > 1:\n X = np.squeeze(X)\n inBin = int(inBin)\n\n N = X.shape[0]\n N2 = int(np.floor(N/2))\n f1 = int(inBin % nbin)\n startbin = np.concatenate((np.arange(f1, inBin, nbin),\n np.arange(inBin, inBin + 3)\n ))\n i = 1 # my fix\n while i < n: # n can be big and xrange is not in Python3\n startbin = np.concatenate((startbin,\n np.arange(startbin[-1] + 1,\n (inBin + 1)*(i + 1) - 1, nbin),\n (i + 1)*(inBin + 1) - 1 + np.arange(0, 3)\n ))\n i = i + 1\n # the following is my fix - REP?\n startbin = np.concatenate((startbin, np.array((startbin[-1] + 1,))))\n m = startbin[-1] + nbin\n while m < N2 - 1:\n startbin = np.concatenate((startbin, np.array((m,))))\n nbin = np.min((nbin*1.1, 2**10))\n m = int(np.round(m + nbin, 0))\n\n stopbin = np.concatenate((startbin[1:] - 1, np.array((N2 - 1,))))\n f = ((startbin + stopbin)/2)/N\n p = np.zeros(f.shape)\n for i in range(f.shape[0]):\n p[i] = dbp(norm(X[startbin[i]:stopbin[i] + 1])**2/\n (stopbin[i] - startbin[i] + 1))\n return f, p", "metadata": "root.logsmooth", "header": "['module', '___EOS___']", "index": 26 } ]
[]
[]
0
true
[ "[CLS]_", "Compari", "son_", "of_", "identical_", "values_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "logs", "moo", "th_", "(_", "X_", ",_", "in", "Bin_", ",_", "nbin", "_", "=_", "8_", ",_", "n_", "=_", "3_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Smooth", " ", "the", " ", "FFT", " ", "and", " ", "convert", " ", "it", " ", "to", " ", "d", "B", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "**", "Parameter", "s", ":*", "*", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "X", " ", ":", " ", "(", "N", ",)", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "FFT", " ", "data", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "in", "Bin", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "bin", " ", "index", " ", "of", " ", "the", " ", "input", " ", "sine", " ", "wave", " ", "(", "if", " ", "any", ").", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "nbin", " ", ":", " ", "int", ",", " ", "option", "al", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "number", " ", "of", " ", "bins", " ", "on", " ", "whi", "ch", " ", "the", " ", "averag", "ing", " ", "will", " ", "be", " ", "perform", "ed", ",", "\\", "10", ";", " ", " ", " ", " ", "used", " ", "*", "bef", "ore", "*", " ", "3", "*", "in", "Bin", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "n", " ", ":", " ", "int", ",", " ", "option", "al", "\\", "10", ";", " ", " ", " ", " ", "Aro", "und", " ", "the", " ", "location", " ", "of", " ", "the", " ", "input", " ", "signal", " ", "and", " ", "its", " ", "harmonic", "s", " ", "(", "up", " ", "to", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "third", " ", "harmonic", "),", " ", "don", "'", "t", " ", "averag", "e", " ", "for", " ", "n", " ", "bins", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "``", "logs", "moo", "th", "``", " ", "algo", "rit", "hm", " ", "use", "s", " ", "``", "nbin", "``", " ", "bins", " ", "from", " ", "0", " ", "to", " ", "3", "*", "in", "Bin", ",", "\\", "10", ";", " ", " ", " ", " ", "there", "after", " ", "the", " ", "bin", " ", "size", "s", " ", "are", " ", "increase", "d", " ", "by", " ", "a", " ", "factor", " ", "1.1", ",", "\\", "10", ";", " ", " ", " ", " ", "stay", "ing", " ", "less", " ", "than", " ", "2", "^", "10.", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "For", " ", "the", " ", ":", "math", ":`", "n", "`", " ", "sets", " ", "of", " ", "bins", ":", "\\", "10", ";", " ", " ", " ", " ", ":", "math", ":`", "in", "Bin", " ", "+", " ", "i", ",", " ", "2", "*", "in", "Bin", " ", "+", " ", "i", " ", "...", " ", "n", "*", "in", "Bin", "+", "i", "`", ",", " ", "where", " ", ":", "math", ":`", "i", " ", "\\\\\\\\", "in", " ", "[", "0", ",", "2", "]`", "\\", "10", ";", " ", " ", " ", " ", "don", "'", "t", " ", "do", " ", "averag", "ing", ".", " ", "Thi", "s", " ", "way", ",", " ", "the", " ", "noise", " ", "BW", "\\", "10", ";", " ", " ", " ", " ", "and", " ", "the", " ", "scal", "ing", " ", "of", " ", "the", " ", "tone", " ", "and", " ", "its", " ", "harmonic", "s", " ", "are", " ", "unchanged", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "..", " ", "note", "::", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Unf", "ort", "unat", "el", "y", ",", " ", "harmonic", "s", " ", "above", " ", "the", " ", "nth", " ", "appear", " ", "small", "er", " ", "than", " ", "the", "y", "\\", "10", ";", " ", " ", " ", " ", "reall", "y", " ", "are", " ", "bec", "aus", "e", " ", "thei", "r", " ", "energ", "y", " ", "is", " ", "averaged", " ", "over", " ", "many", " ", "bins", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "**", "Return", "s", ":*", "*", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "f", ",", " ", "p", " ", ":", " ", "tuple", " ", "of", " ", "1d", "-", "arrays", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "bins", " ", "and", " ", "smoothed", " ", "FFT", ",", " ", "express", "ed", " ", "in", " ", "d", "B", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "..", " ", "see", "als", "o", "::", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", " ", "*", " ", ":", "func", ":`", "plot", "Spect", "rum", "`", ",", " ", "convenien", "ce", " ", "function", " ", "to", " ", "first", " ", "call", "\\", "10", ";", " ", " ", " ", ":", "func", ":`", "logs", "moo", "th", "`", " ", "and", " ", "then", " ", "plot", " ", "on", " ", "a", " ", "logar", "ithm", "ic", " ", "x", "-", "axis", " ", "its", " ", "return", "\\", "10", ";", " ", " ", " ", "values", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", " ", "*", " ", ":", "func", ":`", "circ", "\\u", "smooth", "`", ",", " ", "smoothing", " ", "algo", "rit", "hm", " ", "suit", "able", " ", "for", " ", "linear", "\\", "10", ";", " ", " ", " ", "x", "-", "axis", " ", "plott", "ing", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "..", " ", "plot", "::", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "import", " ", "mat", "plotlib", ".", "pypl", "ot", " ", "as", " ", "plt", "\\", "10", ";", " ", " ", " ", " ", "import", " ", "nump", "y", " ", "as", " ", "np", "\\", "10", ";", " ", " ", " ", " ", "from", " ", "deltas", "igm", "a", " ", "import", " ", "db", "v", ",", " ", "ds", "\\u", "hann", ",", " ", "figure", "Mag", "ic", ",", " ", "logs", "moo", "th", "\\", "10", ";", " ", " ", " ", " ", "T", " ", "=", " ", "2", " ", "#", "s", "\\", "10", ";", " ", " ", " ", " ", "Fs", " ", "=", " ", "231", "e3", " ", "#", "H", "z", "\\", "10", ";", " ", " ", " ", " ", "N", " ", "=", " ", "int", "(", "np", ".", "round", "(", "T", "*", "Fs", ",", " ", "0", "))", " ", "#", " ", "FFT", " ", "points", "\\", "10", ";", " ", " ", " ", " ", "freq", " ", "=", " ", ".1", "e3", "\\", "10", ";", " ", " ", " ", " ", "t", " ", "=", " ", "np", ".", "aran", "ge", "(", "N", ")/", "Fs", "\\", "10", ";", " ", " ", " ", " ", "u0", " ", "=", " ", "np", ".", "sin", "(", "2", "*", "np", ".", "pi", "*", "t", "*", "freq", ")", "\\", "10", ";", " ", " ", " ", " ", "u0", " ", "=", " ", "u0", " ", "+", " ", ".01", "*", "u0", "**", "2", "+.", "001", "*", "u0", "**", "3", "+.", "005", "*", "u0", "**", "4", "\\", "10", ";", " ", " ", " ", " ", "U", " ", "=", " ", "np", ".", "fft", ".", "fft", "(", "u0", " ", "*", " ", "ds", "\\u", "hann", "(", "N", "))/(", "N", "/", "4", ")", "\\", "10", ";", " ", " ", " ", " ", "f", " ", "=", " ", "np", ".", "lins", "pace", "(", "0", ",", " ", "Fs", ",", " ", "N", " ", "+", " ", "1", ")", "\\", "10", ";", " ", " ", " ", " ", "f", " ", "=", " ", "f", "[:", "N", "/", "2", " ", "+", " ", "1", "]", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "subplot", "(", "211", ")", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "semi", "log", "x", "(", "f", ",", " ", "db", "v", "(", "U", "[:", "N", "/", "2", " ", "+", " ", "1", "]))", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "hold", "(", "Tru", "e", ")", "\\", "10", ";", " ", " ", " ", " ", "in", "Bin", " ", "=", " ", "np", ".", "round", "(", "freq", "/", "Fs", "*", "N", ")", "\\", "10", ";", " ", " ", " ", " ", "f", "S", ",", " ", "US", " ", "=", " ", "logs", "moo", "th", "(", "U", ",", " ", "in", "Bin", ")", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "semi", "log", "x", "(", "f", "S", "*", "Fs", ",", " ", "US", ",", " ", "'", "r", "',", " ", "line", "widt", "h", "=", "2.5", ")", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "xlim", "([", "f", "[", "0", "]*", "Fs", ",", " ", "Fs", "/", "2", "])", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "ylabel", "('", "U", "(", "f", ")", " ", "[", "d", "B", "]'", ")", "\\", "10", ";", " ", " ", " ", " ", "figure", "Mag", "ic", "(", "x", "Range", "=[", "100", ",", " ", "1e", "4", "],", " ", "y", "Range", "=[", "-", "400", ",", " ", "0", "],", " ", "name", "='", "Spect", "rum", "')", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "subplot", "(", "212", ")", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "loglo", "g", "(", "f", "S", "[", "1", ":]", "*", "Fs", ",", " ", "np", ".", "diff", "(", "f", "S", "*", "Fs", "))\\", "10", ";", " ", " ", " ", " ", "plt", ".", "xlabel", "('", "f", " ", "[", "H", "z", "]'", ")", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "ylabel", "('", "Ave", "rag", "ing", " ", "interval", " ", "[", "H", "z", "]'", ")", "\\", "10", ";", " ", " ", " ", " ", "figure", "Mag", "ic", "(", "x", "Range", "=[", "100", ",", " ", "1e", "4", "])", "\\", "10", ";", " ", " ", " ", " ", "plt", ".", "show", "()", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "prel", "imina", "ry", " ", "sani", "ti", "zatio", "n", " ", "of", " ", "the", " ", "input_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "np_", "._", "prod_", "(_", "X_", "._", "shape_", ")_", "==_", "max_", "(_", "X_", "._", "shape_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Value", "Error_", "(_", "'", "Expect", "ed", " ", "a", " ", "(", "N", ",)", " ", "or", " ", "(", "N", ",", " ", "1", ")-", "shaped", " ", "array", ".'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "len_", "(_", "X_", "._", "shape_", ")_", ">_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "X_", "=_", "np_", "._", "squeeze_", "(_", "X_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "in", "Bin_", "=_", "int_", "(_", "in", "Bin_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "N_", "=_", "X_", "._", "shape_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "N2_", "=_", "int_", "(_", "np_", "._", "floor_", "(_", "N_", "/_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "f1_", "=_", "int_", "(_", "in", "Bin_", "%_", "nbin", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "bin_", "=_", "np_", "._", "concatenate_", "(_", "(_", "np_", "._", "arange_", "(_", "f1_", ",_", "in", "Bin_", ",_", "nbin", "_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "np_", "._", "arange_", "(_", "in", "Bin_", ",_", "in", "Bin_", "+_", "3_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "i_", "=_", "1_", "#", " ", "my", " ", "fix_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "i_", "<_", "n_", ":_", "#", " ", "n", " ", "can", " ", "be", " ", "big", " ", "and", " ", "xran", "ge", " ", "is", " ", "not", " ", "in", " ", "Pyth", "on", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "start", "bin_", "=_", "np_", "._", "concatenate_", "(_", "(_", "start", "bin_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "np_", "._", "arange_", "(_", "start", "bin_", "[_", "-_", "1_", "]_", "+_", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "in", "Bin_", "+_", "1_", ")_", "*_", "(_", "i_", "+_", "1_", ")_", "-_", "1_", ",_", "nbin", "_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "i_", "+_", "1_", ")_", "*_", "(_", "in", "Bin_", "+_", "1_", ")_", "-_", "1_", "+_", "np_", "._", "arange_", "(_", "0_", ",_", "3_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "i_", "=_", "i_", "+_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "the", " ", "follow", "ing", " ", "is", " ", "my", " ", "fix", " ", "-", " ", "REP", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "start", "bin_", "=_", "np_", "._", "concatenate_", "(_", "(_", "start", "bin_", ",_", "np_", "._", "array_", "(_", "(_", "start", "bin_", "[_", "-_", "1_", "]_", "+_", "1_", ",_", ")_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m_", "=_", "start", "bin_", "[_", "-_", "1_", "]_", "+_", "nbin", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "m_", "<_", "N2_", "-_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "start", "bin_", "=_", "np_", "._", "concatenate_", "(_", "(_", "start", "bin_", ",_", "np_", "._", "array_", "(_", "(_", "m_", ",_", ")_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nbin", "_", "=_", "np_", "._", "min_", "(_", "(_", "nbin", "_", "*_", "1.1_", ",_", "2_", "**_", "10_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m_", "=_", "int_", "(_", "np_", "._", "round_", "(_", "m_", "+_", "nbin", "_", ",_", "0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "stop", "bin_", "=_", "np_", "._", "concatenate_", "(_", "(_", "start", "bin_", "[_", "1_", ":_", "]_", "-_", "1_", ",_", "np_", "._", "array_", "(_", "(_", "N2_", "-_", "1_", ",_", ")_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "f_", "=_", "(_", "(_", "start", "bin_", "+_", "stop", "bin_", ")_", "/_", "2_", ")_", "/_", "N_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "np_", "._", "zeros_", "(_", "f_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "f_", "._", "shape_", "[_", "0_", "]_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "i_", "]_", "=_", "dbp", "_", "(_", "norm_", "(_", "X_", "[_", "start", "bin_", "[_", "i_", "]_", ":_", "stop", "bin_", "[_", "i_", "]_", "+_", "1_", "]_", ")_", "**_", "2_", "/_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "stop", "bin_", "[_", "i_", "]_", "-_", "start", "bin_", "[_", "i_", "]_", "+_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "f_", ",_", "p_" ]
[ 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
ofa/connect/open_connect/accounts/forms.py
[ { "content": "class UserImageForm(forms.ModelForm):\n \"\"\"Form for GroupImage model.\"\"\"\n image = forms.ImageField(required=False)\n\n class Meta(object):\n \"\"\"Meta options.\"\"\"\n model = Image\n fields = ['image']", "metadata": "root.UserImageForm", "header": "['module', '___EOS___']", "index": 22 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "User", "Image", "Form_", "(_", "forms_", "._", "Model", "Form_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Form", " ", "for", " ", "Group", "Image", " ", "model", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "image_", "=_", "forms_", "._", "Image", "Field_", "(_", "required_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Meta_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Meta", " ", "options", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "model_", "=_", "Image_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fields_", "=_", "[_", "'", "image", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
agiliq/django-socialnews/socialnews/news/accounts.py
[ { "content": " def get(self, request, username):\n user = User.objects.get(username=username)\n try:\n key = PasswordResetKey.objects.get(user = user)\n except PasswordResetKey.DoesNotExist:\n return HttpResponseForbidden('The key you provided was wrong. Your password could not be reset.')\n request_key = request.GET.get('key', '')\n if request_key == key.key:\n password = helpers.generate_random_key()\n user.set_password(password)\n mail_text = render_to_string('registraion/password_reset_done.txt', dict(user=user, password=password))\n send_mail('Password reset', mail_text, '[email protected]', [user.email])\n key.delete()\n payload = {}\n return render(request, payload, 'registration/password_reset_done.html')\n else:\n return HttpResponseForbidden('The key you provided was wrong. Your password could nit be reset.')", "metadata": "root.ResetPasswordDone.get", "header": "['class', 'ResetPasswordDone', '(', 'View', ')', ':', '___EOS___']", "index": 145 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Reset", "Passw", "ord", "Done_", "(_", "View_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "get_", "(_", "self_", ",_", "request_", ",_", "username_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "=_", "User_", "._", "objects_", "._", "get_", "(_", "username_", "=_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "key_", "=_", "Passw", "ord", "Reset", "Key_", "._", "objects_", "._", "get_", "(_", "user_", "=_", "user_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Passw", "ord", "Reset", "Key_", "._", "Do", "es", "Not", "Exist_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Forbidden_", "(_", "'", "The", " ", "key", " ", "you", " ", "provided", " ", "was", " ", "wrong", ".", " ", "You", "r", " ", "password", " ", "coul", "d", " ", "not", " ", "be", " ", "reset", ".'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "request", "\\u", "key_", "=_", "request_", "._", "GET_", "._", "get_", "(_", "'", "key", "'_", ",_", "''_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "request", "\\u", "key_", "==_", "key_", "._", "key_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "password_", "=_", "helpers_", "._", "generat", "e\\u", "random", "\\u", "key_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user_", "._", "set\\u", "password_", "(_", "password_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mail", "\\u", "text_", "=_", "render", "\\u", "to", "\\u", "string_", "(_", "'", "registra", "ion", "/", "password", "\\u", "reset", "\\u", "don", "e", ".", "txt", "'_", ",_", "dict_", "(_", "user_", "=_", "user_", ",_", "password_", "=_", "password_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "send", "\\u", "mail_", "(_", "'", "Passw", "ord", " ", "reset", "'_", ",_", "mail", "\\u", "text_", ",_", "'", "hell", "o", "@", "4", "2t", "opi", "cs", ".", "com", "'_", ",_", "[_", "user_", "._", "email_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "payload_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "render_", "(_", "request_", ",_", "payload_", ",_", "'", "registration", "/", "password", "\\u", "reset", "\\u", "don", "e", ".", "html", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Forbidden_", "(_", "'", "The", " ", "key", " ", "you", " ", "provided", " ", "was", " ", "wrong", ".", " ", "You", "r", " ", "password", " ", "coul", "d", " ", "nit", " ", "be", " ", "reset", ".'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
batiste/django-page-cms/pages/tests/test_selenium.py
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Django page CMS selemium test module\"\"\"\nfrom pages.models import Page\nfrom pages.tests.testcase import TestCase\nfrom pages import settings\nfrom django.core.urlresolvers import reverse\nfrom django.test import LiveServerTestCase\nfrom django.contrib import auth\n\nfrom selenium import webdriver\nfrom selenium.webdriver.common.by import By\nfrom selenium.webdriver.support.ui import WebDriverWait\nfrom selenium.webdriver.support import expected_conditions as EC\n\n\nscreenshot_nb = 1\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class SeleniumTestCase(TestCase, LiveServerTestCase):\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.SeleniumTestCase", "header": "['module', '___EOS___']", "index": 18 }, { "content": " def setUp(self):\n self.browser = webdriver.PhantomJS()\n client = self.get_admin_client()\n\n # setUp is where you instantiate the selenium webdriver and loads the browser.\n auth.models.User.objects.create_superuser(\n username='admin_s',\n password='admin',\n email='[email protected]'\n )\n\n self.browser.get('%s%s' % (self.live_server_url, reverse(\"admin:index\")))\n\n super(SeleniumTestCase, self).setUp()", "metadata": "root.SeleniumTestCase.setUp", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 20 }, { "content": " def screenshot(self):\n global screenshot_nb\n if settings.PAGE_TESTS_SAVE_SCREENSHOTS:\n self.browser.save_screenshot('screenshot_%d.png' % screenshot_nb)\n screenshot_nb += 1", "metadata": "root.SeleniumTestCase.screenshot", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 35 }, { "content": " def select_option(self, select, option_id):\n for option in select.find_elements_by_tag_name('option'):\n if option.get_attribute('value') == str(option_id):\n option.click()", "metadata": "root.SeleniumTestCase.select_option", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 41 }, { "content": " def visit(self, url):\n # Open the django admin page.\n # DjangoLiveServerTestCase provides a live server url attribute\n # to access the base url in tests\n url = '%s%s' % (self.live_server_url, url)\n self.browser.get(url)", "metadata": "root.SeleniumTestCase.visit", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 46 }, { "content": " def click(self, selector):\n return self.browser.find_element_by_css_selector(selector).click()", "metadata": "root.SeleniumTestCase.click", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 53 }, { "content": " def wait(self, id):\n return WebDriverWait(self.browser, 3).until(\n EC.presence_of_element_located((By.ID, id)))", "metadata": "root.SeleniumTestCase.wait", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 56 }, { "content": " def login(self):\n self.visit(reverse(\"admin:index\"))\n # Fill login information of admin\n username = self.browser.find_element_by_id(\"id_username\")\n username.send_keys(\"admin_s\")\n password = self.browser.find_element_by_id(\"id_password\")\n password.send_keys(\"admin\")\n self.click(\"input[type='submit']\")", "metadata": "root.SeleniumTestCase.login", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 60 }, { "content": " def tearDown(self):\n self.browser.quit()\n super(SeleniumTestCase, self).tearDown()", "metadata": "root.SeleniumTestCase.tearDown", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 69 }, { "content": " def url_change(self, id):\n return reverse('admin:pages_page_change', args=[id])", "metadata": "root.SeleniumTestCase.url_change", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 73 }, { "content": " def test_admin_select(self):\n self.login()\n page = self.new_page()\n self.visit(self.url_change(page.id))\n status = self.browser.find_element_by_id('id_status')\n self.assertEqual(status.get_attribute('value'), str(page.status))\n\n self.select_option(status, str(Page.DRAFT))\n self.assertEqual(status.get_attribute('value'), str(Page.DRAFT))\n\n src = self.browser.find_element_by_css_selector('.status'\n ).find_element_by_tag_name('img'\n ).get_attribute('src')\n\n self.assertTrue(src.endswith('draft.gif'))", "metadata": "root.SeleniumTestCase.test_admin_select", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 76 }, { "content": " def test_admin_move_page(self):\n self.login()\n page_1 = self.new_page({'slug':'p1'})\n page_2 = self.new_page({'slug':'p2'})\n self.visit(reverse('admin:pages_page_changelist'))\n\n h1 = self.browser.find_element_by_css_selector('#content h1')\n self.assertEqual(h1.text, 'Select page to change')\n\n rows = self.browser.find_elements_by_css_selector('#page-list tbody tr')\n row_1 = rows[0]\n row_2 = rows[1]\n\n self.assertEqual(row_1.get_attribute('id'), 'page-row-%d' % page_1.id)\n self.assertEqual(row_2.get_attribute('id'), 'page-row-%d' % page_2.id)\n\n page_3 = self.new_page({'slug':'p3'})\n\n self.click('#move-link-%d' % page_2.id)\n self.click('#move-target-%d .move-target.left' % page_1.id)\n\n self.wait('page-row-%d' % page_3.id)\n\n rows = self.browser.find_elements_by_css_selector('#page-list tbody tr')\n row_1 = rows[0]\n row_2 = rows[1]\n row_3 = rows[2]\n\n self.screenshot()\n\n self.assertEqual(row_1.get_attribute('id'), 'page-row-%d' % page_2.id)\n self.assertEqual(row_2.get_attribute('id'), 'page-row-%d' % page_1.id)\n self.assertEqual(row_3.get_attribute('id'), 'page-row-%d' % page_3.id)", "metadata": "root.SeleniumTestCase.test_admin_move_page", "header": "['class', 'SeleniumTestCase', '(', 'TestCase', ',', 'LiveServerTestCase', ')', ':', '___EOS___']", "index": 92 } ]
[]
[]
0
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "Dj", "ang", "o", " ", "page", " ", "CMS", " ", "sele", "mi", "um", " ", "test", " ", "module", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pages_", "._", "models_", "import_", "Page_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pages_", "._", "tests_", "._", "testcase_", "import_", "Test", "Case_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pages_", "import_", "settings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "core_", "._", "urlresolvers_", "import_", "reverse_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "test_", "import_", "Live", "Server", "Test", "Case_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "contrib_", "import_", "auth_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "selenium_", "import_", "webdriver_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "selenium_", "._", "webdriver_", "._", "common_", "._", "by_", "import_", "By_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "selenium_", "._", "webdriver_", "._", "support_", "._", "ui_", "import_", "Web", "Drive", "r", "Wait_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "selenium_", "._", "webdriver_", "._", "support_", "import_", "expected", "\\u", "conditions_", "as_", "EC_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "screenshot", "\\u", "nb_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "set", "Up_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "browser_", "=_", "webdriver_", "._", "Pha", "nto", "m", "JS_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "client_", "=_", "self_", "._", "get", "\\u", "admin", "\\u", "client_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "set", "Up", " ", "is", " ", "where", " ", "you", " ", "instantiate", " ", "the", " ", "sele", "niu", "m", " ", "webdriver", " ", "and", " ", "load", "s", " ", "the", " ", "browse", "r", "._", "\\u\\u\\uNL\\u\\u\\u_", "auth_", "._", "models_", "._", "User_", "._", "objects_", "._", "create", "\\u", "superuser_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "'", "admin", "\\u", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "password_", "=_", "'", "admin", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "email_", "=_", "'", "admin", "\\u", "s", "@", "example", ".", "com", "'_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "browser_", "._", "get_", "(_", "'%", "s", "%", "s", "'_", "%_", "(_", "self_", "._", "live", "\\u", "server", "\\u", "url_", ",_", "reverse_", "(_", "\"", "admin", ":", "index", "\"_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "super_", "(_", "Selen", "ium", "Test", "Case_", ",_", "self_", ")_", "._", "set", "Up_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "screenshot_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "global_", "screenshot", "\\u", "nb_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "settings_", "._", "PAGE", "\\u", "TESTS", "\\u", "SAVE", "\\u", "SCREEN", "SHO", "TS_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "browser_", "._", "save", "\\u", "screenshot_", "(_", "'", "screenshot", "\\u", "%", "d", ".", "png", "'_", "%_", "screenshot", "\\u", "nb_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "screenshot", "\\u", "nb_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "select", "\\u", "option_", "(_", "self_", ",_", "select_", ",_", "option", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "option_", "in_", "select_", "._", "find", "\\u", "element", "s", "\\u", "by", "\\u", "tag", "\\u", "name_", "(_", "'", "option", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "option_", "._", "get", "\\u", "attribute_", "(_", "'", "value", "'_", ")_", "==_", "str_", "(_", "option", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "option_", "._", "click_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "visit_", "(_", "self_", ",_", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Open", " ", "the", " ", "django", " ", "admin", " ", "page", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Dj", "ang", "o", "Live", "Server", "Test", "Case", " ", "provide", "s", " ", "a", " ", "live", " ", "server", " ", "url", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "to", " ", "access", " ", "the", " ", "base", " ", "url", " ", "in", " ", "tests_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "'%", "s", "%", "s", "'_", "%_", "(_", "self_", "._", "live", "\\u", "server", "\\u", "url_", ",_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "browser_", "._", "get_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "click_", "(_", "self_", ",_", "selector_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "browser_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "css", "\\u", "selector_", "(_", "selector_", ")_", "._", "click_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "wait_", "(_", "self_", ",_", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Web", "Drive", "r", "Wait_", "(_", "self_", "._", "browser_", ",_", "3_", ")_", "._", "until_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "EC_", "._", "presen", "ce", "\\u", "of", "\\u", "element", "\\u", "located", "_", "(_", "(_", "By_", "._", "ID_", ",_", "id_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "login_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "visit_", "(_", "reverse_", "(_", "\"", "admin", ":", "index", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Fil", "l", " ", "login", " ", "informati", "on", " ", "of", " ", "admin_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "id_", "(_", "\"", "id", "\\u", "user", "name", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "username_", "._", "send", "\\u", "keys_", "(_", "\"", "admin", "\\u", "s", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "password_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "id_", "(_", "\"", "id", "\\u", "password", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "password_", "._", "send", "\\u", "keys_", "(_", "\"", "admin", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "click_", "(_", "\"", "input", "[", "type", "='", "submit", "']\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tear", "Down_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "browser_", "._", "quit_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "Selen", "ium", "Test", "Case_", ",_", "self_", ")_", "._", "tear", "Down_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "url", "\\u", "change_", "(_", "self_", ",_", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "reverse_", "(_", "'", "admin", ":", "page", "s", "\\u", "page", "\\u", "change", "'_", ",_", "args_", "=_", "[_", "id_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "admin", "\\u", "select_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "login_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "page_", "=_", "self_", "._", "new", "\\u", "page_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "visit_", "(_", "self_", "._", "url", "\\u", "change_", "(_", "page_", "._", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "status_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "id_", "(_", "'", "id", "\\u", "status", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "status_", "._", "get", "\\u", "attribute_", "(_", "'", "value", "'_", ")_", ",_", "str_", "(_", "page_", "._", "status_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "select", "\\u", "option_", "(_", "status_", ",_", "str_", "(_", "Page_", "._", "DRA", "FT_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "status_", "._", "get", "\\u", "attribute_", "(_", "'", "value", "'_", ")_", ",_", "str_", "(_", "Page_", "._", "DRA", "FT_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "src_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "css", "\\u", "selector_", "(_", "'.", "status", "'_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "tag", "\\u", "name_", "(_", "'", "img", "'_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "._", "get", "\\u", "attribute_", "(_", "'", "src", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "src_", "._", "endswith_", "(_", "'", "draft", ".", "gif", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Selen", "ium", "Test", "Case_", "(_", "Test", "Case_", ",_", "Live", "Server", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "admin", "\\u", "move", "\\u", "page_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "login_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "page", "\\u", "1_", "=_", "self_", "._", "new", "\\u", "page_", "(_", "{_", "'", "slug", "'_", ":_", "'", "p1", "'_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "page", "\\u", "2_", "=_", "self_", "._", "new", "\\u", "page_", "(_", "{_", "'", "slug", "'_", ":_", "'", "p2", "'_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "visit_", "(_", "reverse_", "(_", "'", "admin", ":", "page", "s", "\\u", "page", "\\u", "changeli", "st", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "h1_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "\\u", "by", "\\u", "css", "\\u", "selector_", "(_", "'#", "content", " ", "h1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "h1_", "._", "text_", ",_", "'", "Select", " ", "page", " ", "to", " ", "change", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "rows_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "s", "\\u", "by", "\\u", "css", "\\u", "selector_", "(_", "'#", "page", "-", "list", " ", "tbo", "dy", " ", "tr", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "row", "\\u", "1_", "=_", "rows_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "row", "\\u", "2_", "=_", "rows_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "row", "\\u", "1_", "._", "get", "\\u", "attribute_", "(_", "'", "id", "'_", ")_", ",_", "'", "page", "-", "row", "-%", "d", "'_", "%_", "page", "\\u", "1_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "row", "\\u", "2_", "._", "get", "\\u", "attribute_", "(_", "'", "id", "'_", ")_", ",_", "'", "page", "-", "row", "-%", "d", "'_", "%_", "page", "\\u", "2_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "page", "\\u", "3_", "=_", "self_", "._", "new", "\\u", "page_", "(_", "{_", "'", "slug", "'_", ":_", "'", "p3", "'_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "click_", "(_", "'#", "move", "-", "link", "-%", "d", "'_", "%_", "page", "\\u", "2_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "click_", "(_", "'#", "move", "-", "target", "-%", "d", " ", ".", "move", "-", "target", ".", "left", "'_", "%_", "page", "\\u", "1_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "wait_", "(_", "'", "page", "-", "row", "-%", "d", "'_", "%_", "page", "\\u", "3_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "rows_", "=_", "self_", "._", "browser_", "._", "find", "\\u", "element", "s", "\\u", "by", "\\u", "css", "\\u", "selector_", "(_", "'#", "page", "-", "list", " ", "tbo", "dy", " ", "tr", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "row", "\\u", "1_", "=_", "rows_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "row", "\\u", "2_", "=_", "rows_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "row", "\\u", "3_", "=_", "rows_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "screenshot_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "row", "\\u", "1_", "._", "get", "\\u", "attribute_", "(_", "'", "id", "'_", ")_", ",_", "'", "page", "-", "row", "-%", "d", "'_", "%_", "page", "\\u", "2_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "row", "\\u", "2_", "._", "get", "\\u", "attribute_", "(_", "'", "id", "'_", ")_", ",_", "'", "page", "-", "row", "-%", "d", "'_", "%_", "page", "\\u", "1_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "row", "\\u", "3_", "._", "get", "\\u", "attribute_", "(_", "'", "id", "'_", ")_", ",_", "'", "page", "-", "row", "-%", "d", "'_", "%_", "page", "\\u", "3_",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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Except block handles 'BaseException'
lisa-lab/pylearn2/pylearn2/models/kmeans.py
[ { "content": "\"\"\"K-means as a postprocessing Block subclass.\"\"\"\n\nimport logging\nimport numpy\nfrom theano.compat.six.moves import xrange\nfrom pylearn2.blocks import Block\nfrom pylearn2.models.model import Model\nfrom pylearn2.space import VectorSpace\nfrom pylearn2.utils import sharedX\nfrom pylearn2.utils.mem import improve_memory_error_message\nfrom pylearn2.utils import wraps\nfrom pylearn2.utils import contains_nan\nimport warnings\n\ntry:\n import milk\nexcept ImportError:\n milk = None\n warnings.warn(\"\"\" Install milk ( http://packages.python.org/milk/ )\n It has a better k-means implementation. Falling back to\n our own really slow implementation. \"\"\")\n\nlogger = logging.getLogger(__name__)\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[]
[]
0
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "K", "-", "means", " ", "as", " ", "a", " ", "postprocess", "ing", " ", "Block", " ", "subclass", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "theano_", "._", "compat_", "._", "six_", "._", "moves_", "import_", "xrange_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "blocks_", "import_", "Block_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "models_", "._", "model_", "import_", "Model_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "space_", "import_", "Vector", "Space_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "utils_", "import_", "shared", "X_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "utils_", "._", "mem_", "import_", "improve", "\\u", "memory", "\\u", "error", "\\u", "message_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "utils_", "import_", "wraps_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "utils_", "import_", "contain", "s", "\\u", "nan_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "warnings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "mil", "k_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mil", "k_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "warnings_", "._", "warn_", "(_", "\"\"\"", " ", "Install", " ", "mil", "k", " ", "(", " ", "http", "://", "package", "s", ".", "python", ".", "org", "/", "mil", "k", "/", " ", ")", "\\", "10", ";", " ", " ", "It", " ", "has", " ", "a", " ", "bett", "er", " ", "k", "-", "means", " ", "implementation", ".", " ", "Fall", "ing", " ", "back", " ", "to", "\\", "10", ";", " ", " ", "our", " ", "own", " ", "reall", "y", " ", "slow", " ", "implementation", ".", " ", "\"\"\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "logger_", "=_", "logging_", "._", "get", "Logger_", "(_", "\\u\\u", "name\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
twitter/pycascading/python/pycascading/cogroup.py
[ { "content": " def __create_args(self,\n group_name=None,\n pipes=None, group_fields=None, declared_fields=None,\n result_group_fields=None, joiner=None,\n pipe=None, num_self_joins=None,\n lhs=None, lhs_group_fields=None,\n rhs=None, rhs_group_fields=None):\n # We can use an unnamed parameter only for group_fields\n if self.__args:\n group_fields = [coerce_to_fields(f) for f in self.__args[0]]\n args = []\n if group_name:\n args.append(str(group_name))\n if lhs:\n args.append(lhs.get_assembly())\n args.append(coerce_to_fields(lhs_group_fields))\n args.append(rhs.get_assembly())\n args.append(coerce_to_fields(rhs_group_fields))\n if declared_fields:\n args.append(coerce_to_fields(declared_fields))\n if result_group_fields:\n args.append(coerce_to_fields(result_group_fields))\n if joiner:\n args.append(joiner)\n elif pipes:\n args.append([p.get_assembly() for p in pipes])\n if group_fields:\n args.append([coerce_to_fields(f) for f in group_fields])\n if declared_fields:\n args.append(coerce_to_fields(declared_fields))\n if result_group_fields:\n args.append(coerce_to_fields(result_group_fields))\n else:\n args.append(None)\n if joiner is None:\n joiner = cascading.pipe.cogroup.InnerJoin()\n args.append(joiner)\n elif pipe:\n args.append(pipe.get_assembly())\n args.append(coerce_to_fields(group_fields))\n args.append(int(num_self_joins))\n if declared_fields:\n args.append(coerce_to_fields(declared_fields))\n if result_group_fields:\n args.append(coerce_to_fields(result_group_fields))\n if joiner:\n args.append(joiner)\n return args", "metadata": "root.CoGroup.__create_args", "header": "['class', 'CoGroup', '(', 'Operation', ')', ':', '___EOS___']", "index": 56 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Co", "Group_", "(_", "Operation_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "create", "\\u", "args_", "(_", "self_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "group", "\\u", "name_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pipes_", "=_", "None_", ",_", "group", "\\u", "fields_", "=_", "None_", ",_", "declared", "\\u", "fields_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "result", "\\u", "group", "\\u", "fields_", "=_", "None_", ",_", "joine", "r_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pipe_", "=_", "None_", ",_", "num", "\\u", "self", "\\u", "joins", "_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lhs_", "=_", "None_", ",_", "lh", "s", "\\u", "group", "\\u", "fields_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "rhs_", "=_", "None_", ",_", "rhs", "\\u", "group", "\\u", "fields_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "We", " ", "can", " ", "use", " ", "an", " ", "unn", "ame", "d", " ", "parameter", " ", "only", " ", "for", " ", "group", "\\u", "fields_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "\\u\\u", "args_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "group", "\\u", "fields_", "=_", "[_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "f_", ")_", "for_", "f_", "in_", "self_", "._", "\\u\\u", "args_", "[_", "0_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "args_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "group", "\\u", "name_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "str_", "(_", "group", "\\u", "name_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "lhs_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "lhs_", "._", "get", "\\u", "assembly_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "lh", "s", "\\u", "group", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "._", "append_", "(_", "rhs_", "._", "get", "\\u", "assembly_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "rhs", "\\u", "group", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "declared", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "declared", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result", "\\u", "group", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "result", "\\u", "group", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "joine", "r_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "joine", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "pipes_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "[_", "p_", "._", "get", "\\u", "assembly_", "(_", ")_", "for_", "p_", "in_", "pipes_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "group", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "[_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "f_", ")_", "for_", "f_", "in_", "group", "\\u", "fields_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "declared", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "declared", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result", "\\u", "group", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "result", "\\u", "group", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "args_", "._", "append_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "joine", "r_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "joine", "r_", "=_", "cas", "cad", "ing_", "._", "pipe_", "._", "cog", "roup_", "._", "In", "ner", "Join_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "args_", "._", "append_", "(_", "joine", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "pipe_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "pipe_", "._", "get", "\\u", "assembly_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "group", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "._", "append_", "(_", "int_", "(_", "num", "\\u", "self", "\\u", "joins", "_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "declared", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "declared", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result", "\\u", "group", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "args_", "._", "append_", "(_", "coerce", "\\u", "to", "\\u", "fields_", "(_", "result", "\\u", "group", "\\u", "fields_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "joine", "r_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "._", "append_", "(_", "joine", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "args_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
awslabs/lambda-apigateway-twilio-tutorial/twilio/rest/resources/recordings.py
[ { "content": "class Recordings(ListResource):\n\n name = \"Recordings\"\n instance = Recording\n\n", "metadata": "root.Recordings", "header": "['module', '___EOS___']", "index": 24 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Record", "ings_", "(_", "List", "Resource_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "name_", "=_", "\"", "Record", "ings", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "instance_", "=_", "Record", "ing_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
aparo/pyes/tests/test_percolator.py
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nimport unittest\nfrom pyes.tests import ESTestCase\nfrom pyes.query import *\nimport unittest\n\n\n\nif __name__ == \"__main__\":\n unittest.main()\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class PercolatorTestCase(ESTestCase):\n\n\n\n", "metadata": "root.PercolatorTestCase", "header": "['module', '___EOS___']", "index": 7 }, { "content": " def setUp(self):\n super(PercolatorTestCase, self).setUp()\n mapping = { u'parsedtext': {'boost': 1.0,\n 'index': 'analyzed',\n 'store': 'yes',\n 'type': u'string',\n \"term_vector\" : \"with_positions_offsets\"},\n u'name': {'boost': 1.0,\n 'index': 'analyzed',\n 'store': 'yes',\n 'type': u'string',\n \"term_vector\" : \"with_positions_offsets\"},\n u'title': {'boost': 1.0,\n 'index': 'analyzed',\n 'store': 'yes',\n 'type': u'string',\n \"term_vector\" : \"with_positions_offsets\"},\n u'pos': {'store': 'yes',\n 'type': u'integer'},\n u'uuid': {'boost': 1.0,\n 'index': 'not_analyzed',\n 'store': 'yes',\n 'type': u'string'}}\n self.conn.indices.create_index(self.index_name)\n self.conn.indices.put_mapping(self.document_type, {'properties':mapping}, self.index_name)\n self.conn.create_percolator(\n 'test-index',\n 'test-perc1',\n QueryStringQuery(query='apple', search_fields='_all')\n )\n self.conn.create_percolator(\n 'test-index',\n 'test-perc2',\n QueryStringQuery(query='apple OR iphone', search_fields='_all')\n )\n self.conn.create_percolator(\n 'test-index',\n 'test-perc3',\n QueryStringQuery(query='apple AND iphone', search_fields='_all')\n )\n self.conn.indices.refresh(self.index_name)", "metadata": "root.PercolatorTestCase.setUp", "header": "['class', 'PercolatorTestCase', '(', 'ESTestCase', ')', ':', '___EOS___']", "index": 8 }, { "content": " def test_percolator(self):\n results = self.conn.percolate('test-index', 'test-type', PercolatorQuery({'name': 'iphone'}))\n self.assertTrue({'_id': 'test-perc1', '_index': 'test-index'} not in results['matches'])\n self.assertTrue({'_id': 'test-perc2','_index': 'test-index'} in results['matches'])\n self.assertTrue({'_id': 'test-perc3', '_index': 'test-index'} not in results['matches'])", "metadata": "root.PercolatorTestCase.test_percolator", "header": "['class', 'PercolatorTestCase', '(', 'ESTestCase', ')', ':', '___EOS___']", "index": 50 }, { "content": " def test_or(self):\n results = self.conn.percolate('test-index', 'test-type', PercolatorQuery({'name': 'apple'}))\n self.assertTrue({'_id': 'test-perc1', '_index': 'test-index'} in results['matches'])\n self.assertTrue({'_id': 'test-perc2', '_index': 'test-index'} in results['matches'])\n self.assertTrue({'_id': 'test-perc3', '_index': 'test-index'} not in results['matches'])", "metadata": "root.PercolatorTestCase.test_or", "header": "['class', 'PercolatorTestCase', '(', 'ESTestCase', ')', ':', '___EOS___']", "index": 56 }, { "content": " def test_and(self):\n results = self.conn.percolate('test-index', 'test-type', PercolatorQuery({'name': 'apple iphone'}))\n self.assertTrue({'_id': 'test-perc1', '_index': 'test-index'} in results['matches'])\n self.assertTrue({'_id': 'test-perc2', '_index': 'test-index'} in results['matches'])\n self.assertTrue({'_id': 'test-perc3', '_index': 'test-index'} in results['matches'])", "metadata": "root.PercolatorTestCase.test_and", "header": "['class', 'PercolatorTestCase', '(', 'ESTestCase', ')', ':', '___EOS___']", "index": 62 }, { "content": " def tearDown(self):\n self.conn.delete_percolator('test-index', 'test-perc1')\n self.conn.delete_percolator('test-index', 'test-perc2')\n self.conn.delete_percolator('test-index', 'test-perc3')\n super(PercolatorTestCase, self).tearDown()", "metadata": "root.PercolatorTestCase.tearDown", "header": "['class', 'PercolatorTestCase', '(', 'ESTestCase', ')', ':', '___EOS___']", "index": 68 } ]
[]
[]
0
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "abs", "olute", "\\u", "import_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pye", "s_", "._", "tests_", "import_", "EST", "est", "Case_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pye", "s_", "._", "query_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "\"\\u\\u", "main", "\\u\\u\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "unittest_", "._", "main_", "(_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Per", "colat", "or", "Test", "Case_", "(_", "EST", "est", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Per", "colat", "or", "Test", "Case_", "(_", "EST", "est", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "set", "Up_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Per", "colat", "or", "Test", "Case_", ",_", "self_", ")_", "._", "set", "Up_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mapping_", "=_", "{_", "u", "'", "parsed", "text", "'_", ":_", "{_", "'", "boost", "'_", ":_", "1.0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "index", "'_", ":_", "'", "analyze", "d", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "store", "'_", ":_", "'", "ye", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "type", "'_", ":_", "u", "'", "string", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "term", "\\u", "vector", "\"_", ":_", "\"", "with", "\\u", "position", "s", "\\u", "offset", "s", "\"_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "name", "'_", ":_", "{_", "'", "boost", "'_", ":_", "1.0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "index", "'_", ":_", "'", "analyze", "d", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "store", "'_", ":_", "'", "ye", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "type", "'_", ":_", "u", "'", "string", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "term", "\\u", "vector", "\"_", ":_", "\"", "with", "\\u", "position", "s", "\\u", "offset", "s", "\"_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "title", "'_", ":_", "{_", "'", "boost", "'_", ":_", "1.0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "index", "'_", ":_", "'", "analyze", "d", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "store", "'_", ":_", "'", "ye", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "type", "'_", ":_", "u", "'", "string", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "term", "\\u", "vector", "\"_", ":_", "\"", "with", "\\u", "position", "s", "\\u", "offset", "s", "\"_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "pos", "'_", ":_", "{_", "'", "store", "'_", ":_", "'", "ye", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "type", "'_", ":_", "u", "'", "integ", "er", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "uuid", "'_", ":_", "{_", "'", "boost", "'_", ":_", "1.0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "index", "'_", ":_", "'", "not", "\\u", "analyze", "d", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "store", "'_", ":_", "'", "ye", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "type", "'_", ":_", "u", "'", "string", "'_", "}_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "indices_", "._", "create", "\\u", "index_", "(_", "self_", "._", "index", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "indices_", "._", "put", "\\u", "mapping_", "(_", "self_", "._", "document", "\\u", "type_", ",_", "{_", "'", "proper", "ties", "'_", ":_", "mapping_", "}_", ",_", "self_", "._", "index", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "create", "\\u", "perc", "ola", "tor_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "test", "-", "index", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "test", "-", "perc", "1", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Query", "String", "Query_", "(_", "query_", "=_", "'", "apple", "'_", ",_", "search", "\\u", "fields_", "=_", "'\\u", "all", "'_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "create", "\\u", "perc", "ola", "tor_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "test", "-", "index", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "test", "-", "perc", "2", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Query", "String", "Query_", "(_", "query_", "=_", "'", "apple", " ", "OR", " ", "iph", "one", "'_", ",_", "search", "\\u", "fields_", "=_", "'\\u", "all", "'_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "create", "\\u", "perc", "ola", "tor_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "test", "-", "index", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "test", "-", "perc", "3", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Query", "String", "Query_", "(_", "query_", "=_", "'", "apple", " ", "AND", " ", "iph", "one", "'_", ",_", "search", "\\u", "fields_", "=_", "'\\u", "all", "'_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "indices_", "._", "refresh_", "(_", "self_", "._", "index", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Per", "colat", "or", "Test", "Case_", "(_", "EST", "est", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "perc", "ola", "tor_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "results_", "=_", "self_", "._", "conn_", "._", "perc", "ola", "te_", "(_", "'", "test", "-", "index", "'_", ",_", "'", "test", "-", "type", "'_", ",_", "Per", "colat", "or", "Query_", "(_", "{_", "'", "name", "'_", ":_", "'", "iph", "one", "'_", "}_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "1", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "not_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "2", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "3", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "not_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Per", "colat", "or", "Test", "Case_", "(_", "EST", "est", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "or_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "results_", "=_", "self_", "._", "conn_", "._", "perc", "ola", "te_", "(_", "'", "test", "-", "index", "'_", ",_", "'", "test", "-", "type", "'_", ",_", "Per", "colat", "or", "Query_", "(_", "{_", "'", "name", "'_", ":_", "'", "apple", "'_", "}_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "1", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "2", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "3", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "not_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Per", "colat", "or", "Test", "Case_", "(_", "EST", "est", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "and_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "results_", "=_", "self_", "._", "conn_", "._", "perc", "ola", "te_", "(_", "'", "test", "-", "index", "'_", ",_", "'", "test", "-", "type", "'_", ",_", "Per", "colat", "or", "Query_", "(_", "{_", "'", "name", "'_", ":_", "'", "apple", " ", "iph", "one", "'_", "}_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "1", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "2", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "{_", "'\\u", "id", "'_", ":_", "'", "test", "-", "perc", "3", "'_", ",_", "'\\u", "index", "'_", ":_", "'", "test", "-", "index", "'_", "}_", "in_", "results_", "[_", "'", "matche", "s", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Per", "colat", "or", "Test", "Case_", "(_", "EST", "est", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tear", "Down_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "conn_", "._", "delete", "\\u", "perc", "ola", "tor_", "(_", "'", "test", "-", "index", "'_", ",_", "'", "test", "-", "perc", "1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "delete", "\\u", "perc", "ola", "tor_", "(_", "'", "test", "-", "index", "'_", ",_", "'", "test", "-", "perc", "2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "conn_", "._", "delete", "\\u", "perc", "ola", "tor_", "(_", "'", "test", "-", "index", "'_", ",_", "'", "test", "-", "perc", "3", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "Per", "colat", "or", "Test", "Case_", ",_", "self_", ")_", "._", "tear", "Down_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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usr/bin/env python\n\n# Copyright (c) 2012 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"\nVerifies that when multiple values are supplied for a gyp define, the last one\nis used.\n\"\"\"\n\nimport os\nimport TestGyp\n\ntest = TestGyp.TestGyp()\n\nos.environ['GYP_DEFINES'] = 'key=value1 key=value2 key=value3'\ntest.run_gyp('defines.gyp')\n\ntest.build('defines.gyp')\ntest.must_contain('action.txt', 'value3')\n\n# The last occurrence of a repeated set should take precedence over other\n# values.\nos.environ['GYP_DEFINES'] = 'key=repeated_value key=value1 key=repeated_value'\ntest.run_gyp('defines.gyp')\n\nif test.format == 'msvs' and not test.uses_msbuild:\n # msvs versions before 2010 don't detect build rule changes not reflected\n # in file system timestamps. Rebuild to see differences.\n test.build('defines.gyp', rebuild=True)\nelse:\n test.build('defines.gyp')\ntest.must_contain('action.txt', 'repeated_value')\n\ntest.pass_test()\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[]
[]
0
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2012", " ", "Goo", "gle", " ", "Inc", ".", " ", "All", " ", "rights", " ", "reserve", "d", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Us", "e", " ", "of", " ", "this", " ", "source", " ", "code", " ", "is", " ", "govern", "ed", " ", "by", " ", "a", " ", "BS", "D", "-", "style", " ", "license", " ", "tha", "t", " ", "can", " ", "be_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "found", " ", "in", " ", "the", " ", "LICENSE", " ", "file", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Verifie", "s", " ", "tha", "t", " ", "whe", "n", " ", "multiple", " ", "values", " ", "are", " ", "supplie", "d", " ", "for", " ", "a", " ", "gyp", " ", "defin", "e", ",", " ", "the", " ", "last", " ", "one", "\\", "10", ";", "is", " ", "used", ".", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "Test", "Gy", "p_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "test_", "=_", "Test", "Gy", "p_", "._", "Test", "Gy", "p_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "os_", "._", "environ_", "[_", "'", "GY", "P", "\\u", "DEFINE", "S", "'_", "]_", "=_", "'", "key", "=", "value", "1", " ", "key", "=", "value", "2", " ", "key", "=", "value", "3", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "test_", "._", "run", "\\u", "gyp", "_", "(_", "'", "defin", "es", ".", "gyp", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "test_", "._", "build_", "(_", "'", "defin", "es", ".", "gyp", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "test_", "._", "must", "\\u", "contain", "_", "(_", "'", "action", ".", "txt", "'_", ",_", "'", "value", "3", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "last", " ", "occurrence", " ", "of", " ", "a", " ", "repeated", " ", "set", " ", "shou", "ld", " ", "take", " ", "preceden", "ce", " ", "over", " ", "other_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "values", "._", "\\u\\u\\uNL\\u\\u\\u_", "os_", "._", "environ_", "[_", "'", "GY", "P", "\\u", "DEFINE", "S", "'_", "]_", "=_", "'", "key", "=", "repeated", "\\u", "value", " ", "key", "=", "value", "1", " ", "key", "=", "repeated", "\\u", "value", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "test_", "._", "run", "\\u", "gyp", "_", "(_", "'", "defin", "es", ".", "gyp", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "test_", "._", "format_", "==_", "'", "msv", "s", "'_", "and_", "not_", "test_", "._", "use", "s", "\\u", "msb", "uild", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "msv", "s", " ", "version", "s", " ", "bef", "ore", " ", "2010", " ", "don", "'", "t", " ", "detect", " ", "build", " ", "rule", " ", "change", "s", " ", "not", " ", "reflect", "ed_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "in", " ", "file", " ", "system", " ", "timestamp", "s", ".", " ", "Reb", "uild", " ", "to", " ", "see", " ", "difference", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test_", "._", "build_", "(_", "'", "defin", "es", ".", "gyp", "'_", ",_", "rebuild_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test_", "._", "build_", "(_", "'", "defin", "es", ".", "gyp", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "test_", "._", "must", "\\u", "contain", "_", "(_", "'", "action", ".", "txt", "'_", ",_", "'", "repeated", "\\u", "value", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "test_", "._", "pass", "\\u", "test_", "(_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Signature mismatch in overriding method
RoseOu/flasky/venv/lib/python2.7/site-packages/gunicorn/app/pasterapp.py
[ { "content": "class PasterBaseApplication(Application):\n gcfg = None\n\n", "metadata": "root.PasterBaseApplication", "header": "['module', '___EOS___']", "index": 70 }, { "content": " def app_config(self):\n return paste_config(self.cfg, self.cfgurl, self.relpath,\n global_conf=self.gcfg)", "metadata": "root.PasterBaseApplication.app_config", "header": "['class', 'PasterBaseApplication', '(', 'Application', ')', ':', '___EOS___']", "index": 73 }, { "content": " def load_config(self):\n super(PasterBaseApplication, self).load_config()\n\n # reload logging conf\n if hasattr(self, \"cfgfname\"):\n parser = ConfigParser.ConfigParser()\n parser.read([self.cfgfname])\n if parser.has_section('loggers'):\n from logging.config import fileConfig\n config_file = os.path.abspath(self.cfgfname)\n fileConfig(config_file, dict(__file__=config_file,\n here=os.path.dirname(config_file)))", "metadata": "root.PasterBaseApplication.load_config", "header": "['class', 'PasterBaseApplication', '(', 'Application', ')', ':', '___EOS___']", "index": 77 }, { "content": "class PasterServerApplication(PasterBaseApplication):\n\n", "metadata": "root.PasterServerApplication", "header": "['module', '___EOS___']", "index": 120 }, { "content": " def __init__(self, app, gcfg=None, host=\"127.0.0.1\", port=None, *args, **kwargs):\n self.cfg = Config()\n self.gcfg = gcfg # need to hold this for app_config\n self.app = app\n self.callable = None\n\n gcfg = gcfg or {}\n cfgfname = gcfg.get(\"__file__\")\n if cfgfname is not None:\n self.cfgurl = 'config:%s' % cfgfname\n self.relpath = os.path.dirname(cfgfname)\n self.cfgfname = cfgfname\n\n cfg = kwargs.copy()\n\n if port and not host.startswith(\"unix:\"):\n bind = \"%s:%s\" % (host, port)\n else:\n bind = host\n cfg[\"bind\"] = bind.split(',')\n\n if gcfg:\n for k, v in gcfg.items():\n cfg[k] = v\n cfg[\"default_proc_name\"] = cfg['__file__']\n\n try:\n for k, v in cfg.items():\n if k.lower() in self.cfg.settings and v is not None:\n self.cfg.set(k.lower(), v)\n except Exception as e:\n print(\"\\nConfig error: %s\" % str(e), file=sys.stderr)\n sys.stderr.flush()\n sys.exit(1)\n\n if cfg.get(\"config\"):\n self.load_config_from_file(cfg[\"config\"])\n else:\n default_config = get_default_config_file()\n if default_config is not None:\n self.load_config_from_file(default_config)", "metadata": "root.PasterServerApplication.__init__", "header": "['class', 'PasterServerApplication', '(', 'PasterBaseApplication', ')', ':', '___EOS___']", "index": 122 }, { "content": " def load(self):\n # chdir to the configured path before loading,\n # default is the current dir\n os.chdir(self.cfg.chdir)\n\n return self.app", "metadata": "root.PasterServerApplication.load", "header": "['class', 'PasterServerApplication', '(', 'PasterBaseApplication', ')', ':', '___EOS___']", "index": 164 } ]
[]
[]
0
false
[ "[CLS]_", "Signature_", "mismatch_", "in_", "overrid", "ing_", "method_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Past", "er", "Base", "Application_", "(_", "Application_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gcf", "g_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Past", "er", "Base", "Application_", "(_", "Application_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "app", "\\u", "config_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "paste", "\\u", "config_", "(_", "self_", "._", "cfg_", ",_", "self_", "._", "cfg", "url_", ",_", "self_", "._", "relpath_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "global", "\\u", "conf_", "=_", "self_", "._", "gcf", "g_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Past", "er", "Base", "Application_", "(_", "Application_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "load", "\\u", "config_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Past", "er", "Base", "Application_", ",_", "self_", ")_", "._", "load", "\\u", "config_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "relo", "ad", " ", "logg", "ing", " ", "conf_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "hasattr_", "(_", "self_", ",_", "\"", "cfg", "fname", "\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "parser_", "=_", "Config", "Parser_", "._", "Config", "Parser_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "parser_", "._", "read_", "(_", "[_", "self_", "._", "cfg", "fname_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "parser_", "._", "has", "\\u", "section_", "(_", "'", "logg", "ers", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "logging_", "._", "config_", "import_", "file", "Config_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "config", "\\u", "file_", "=_", "os_", "._", "path_", "._", "abspath_", "(_", "self_", "._", "cfg", "fname_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "file", "Config_", "(_", "config", "\\u", "file_", ",_", "dict_", "(_", "\\u\\u", "file\\u\\u_", "=_", "config", "\\u", "file_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "here_", "=_", "os_", "._", "path_", "._", "dirname_", "(_", "config", "\\u", "file_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Past", "er", "Server", "Application_", "(_", "Past", "er", "Base", "Application_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Past", "er", "Server", "Application_", "(_", "Past", "er", "Base", "Application_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "app_", ",_", "gcf", "g_", "=_", "None_", ",_", "host_", "=_", "\"", "127", ".0", ".0", ".1", "\"_", ",_", "port_", "=_", "None_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "cfg_", "=_", "Config_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "gcf", "g_", "=_", "gcf", "g_", "#", " ", "need", " ", "to", " ", "hold", " ", "this", " ", "for", " ", "app", "\\u", "config_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "app_", "=_", "app_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "callable_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "gcf", "g_", "=_", "gcf", "g_", "or_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cfg", "fname_", "=_", "gcf", "g_", "._", "get_", "(_", "\"\\u\\u", "file", "\\u\\u\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "cfg", "fname_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "cfg", "url_", "=_", "'", "config", ":", "%", "s", "'_", "%_", "cfg", "fname_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "relpath_", "=_", "os_", "._", "path_", "._", "dirname_", "(_", "cfg", "fname_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "cfg", "fname_", "=_", "cfg", "fname_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "cfg_", "=_", "kwargs_", "._", "copy_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "port_", "and_", "not_", "host_", "._", "startswith_", "(_", "\"", "unix", ":\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "bind_", "=_", "\"%", "s", ":", "%", "s", "\"_", "%_", "(_", "host_", ",_", "port_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "bind_", "=_", "host_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "cfg_", "[_", "\"", "bind", "\"_", "]_", "=_", "bind_", "._", "split_", "(_", "','_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "gcf", "g_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "k_", ",_", "v_", "in_", "gcf", "g_", "._", "items_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cfg_", "[_", "k_", "]_", "=_", "v_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "cfg_", "[_", "\"", "default", "\\u", "proc", "\\u", "name", "\"_", "]_", "=_", "cfg_", "[_", "'\\u", "\\u", "file", "\\u\\u'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "k_", ",_", "v_", "in_", "cfg_", "._", "items_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "k_", "._", "lower_", "(_", ")_", "in_", "self_", "._", "cfg_", "._", "settings_", "and_", "v_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "cfg_", "._", "set_", "(_", "k_", "._", "lower_", "(_", ")_", ",_", "v_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "\"\\\\", "n", "Config", " ", "error", ":", " ", "%", "s", "\"_", "%_", "str_", "(_", "e_", ")_", ",_", "file_", "=_", "sys_", "._", "stderr_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sys_", "._", "stderr_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sys_", "._", "exit_", "(_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "cfg_", "._", "get_", "(_", "\"", "config", "\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "load", "\\u", "config", "\\u", "from", "\\u", "file_", "(_", "cfg_", "[_", "\"", "config", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "default", "\\u", "config_", "=_", "get", "\\u", "default", "\\u", "config", "\\u", "file_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "default", "\\u", "config_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "load", "\\u", "config", "\\u", "from", "\\u", "file_", "(_", "default", "\\u", "config_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Past", "er", "Server", "Application_", "(_", "Past", "er", "Base", "Application_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "load_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "chd", "ir", " ", "to", " ", "the", " ", "configur", "ed", " ", "path", " ", "bef", "ore", " ", "load", "ing", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "default", " ", "is", " ", "the", " ", "current", " ", "dir_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "os_", "._", "chdir_", "(_", "self_", "._", "cfg_", "._", "chdir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "self_", "._", "app_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Wrong number of arguments in a call
gregmuellegger/django-autofixture/autofixture/base.py
[ { "content": " def process_field(self, instance, field):\n value = self.get_value(field)\n if value is self.IGNORE_FIELD:\n return\n setattr(instance, field.name, value)", "metadata": "root.AutoFixtureBase.process_field", "header": "['class', 'AutoFixtureBase', '(', 'object', ')', ':', '___EOS___']", "index": 398 }, { "content": " def process_m2m(self, instance, field):\n # check django's version number to determine how intermediary models\n # are checked if they are auto created or not.\n auto_created_through_model = False\n through = get_remote_field(field).through\n auto_created_through_model = through._meta.auto_created\n\n if auto_created_through_model:\n return self.process_field(instance, field)\n # if m2m relation has intermediary model:\n # * only generate relation if 'generate_m2m' is given\n # * first generate intermediary model and assign a newly created\n # related model to the foreignkey\n kwargs = {}\n if field.name in self.generate_m2m:\n # get fk to related model on intermediary model\n related_fks = [fk\n for fk in through._meta.fields\n if isinstance(fk, related.ForeignKey) and \\\n get_remote_field_to(fk) is get_remote_field_to(field)]\n self_fks = [fk\n for fk in through._meta.fields\n if isinstance(fk, related.ForeignKey) and \\\n get_remote_field_to(fk) is self.model]\n assert len(related_fks) == 1\n assert len(self_fks) == 1\n related_fk = related_fks[0]\n self_fk = self_fks[0]\n min_count, max_count = self.generate_m2m[field.name]\n intermediary_model = generators.MultipleInstanceGenerator(\n AutoFixture(\n through,\n field_values={\n self_fk.name: instance,\n related_fk.name: generators.InstanceGenerator(\n autofixture.get(get_remote_field_to(field)))\n }),\n min_count=min_count,\n max_count=max_count,\n **kwargs).generate()", "metadata": "root.AutoFixtureBase.process_m2m", "header": "['class', 'AutoFixtureBase', '(', 'object', ')', ':', '___EOS___']", "index": 404 }, { "content": " def check_constraints(self, instance):\n '''\n Return fieldnames which need recalculation.\n '''\n recalc_fields = []\n for constraint in self.constraints:\n try:\n constraint(self.model, instance)\n except constraints.InvalidConstraint as e:\n recalc_fields.extend(e.fields)\n return recalc_fields", "metadata": "root.AutoFixtureBase.check_constraints", "header": "['class', 'AutoFixtureBase', '(', 'object', ')', ':', '___EOS___']", "index": 450 }, { "content": " def post_process_instance(self, instance, commit):\n '''\n Overwrite this method to modify the created *instance* before it gets\n returned by the :meth:`create` or :meth:`create_one`.\n It gets the generated *instance* and must return the modified\n instance. The *commit* parameter indicates the *commit* value that the\n user passed into the :meth:`create` method. It defaults to ``True``\n and should be respected, which means if it is set to ``False``, the\n *instance* should not be saved.\n '''\n return instance", "metadata": "root.AutoFixtureBase.post_process_instance", "header": "['class', 'AutoFixtureBase', '(', 'object', ')', ':', '___EOS___']", "index": 462 }, { "content": " def pre_process_instance(self, instance):\n '''\n Same as :meth:`post_process_instance`, but it is being called before\n saving an *instance*.\n '''\n return instance", "metadata": "root.AutoFixtureBase.pre_process_instance", "header": "['class', 'AutoFixtureBase', '(', 'object', ')', ':', '___EOS___']", "index": 474 }, { "content": " def create_one(self, commit=True):\n '''\n Create and return one model instance. If *commit* is ``False`` the\n instance will not be saved and many to many relations will not be\n processed.\n\n Subclasses that override ``create_one`` can specify arbitrary keyword\n arguments. They will be passed through by the\n :meth:`autofixture.base.AutoFixture.create` method and the helper\n functions :func:`autofixture.create` and\n :func:`autofixture.create_one`.\n\n May raise :exc:`CreateInstanceError` if constraints are not satisfied.\n '''\n tries = self.tries\n instance = self.model()\n process = instance._meta.fields\n while process and tries > 0:\n for field in process:\n self.process_field(instance, field)\n process = self.check_constraints(instance)\n tries -= 1\n if tries == 0:\n raise CreateInstanceError(\n u'Cannot solve constraints for \"%s\", tried %d times. '\n u'Please check value generators or model constraints. '\n u'At least the following fields are involved: %s' % (\n '%s.%s' % (\n self.model._meta.app_label,\n self.model._meta.object_name),\n self.tries,\n ', '.join([field.name for field in process]),\n ))\n\n instance = self.pre_process_instance(instance)\n\n if commit:\n instance.save()\n\n #to handle particular case of GenericRelation\n #in Django pre 1.6 it appears in .many_to_many\n many_to_many = [f for f in instance._meta.many_to_many\n if not isinstance(f, get_GenericRelation())]\n for field in many_to_many:\n self.process_m2m(instance, field)\n signals.instance_created.send(\n sender=self,\n model=self.model,\n instance=instance,\n committed=commit)\n\n post_process_kwargs = {}\n if 'commit' in getargnames(self.post_process_instance):\n post_process_kwargs['commit'] = commit\n else:\n warnings.warn(\n \"Subclasses of AutoFixture need to provide a `commit` \"\n \"argument for post_process_instance methods\", DeprecationWarning)\n return self.post_process_instance(instance, **post_process_kwargs)", "metadata": "root.AutoFixtureBase.create_one", "header": "['class', 'AutoFixtureBase', '(', 'object', ')', ':', '___EOS___']", "index": 481 } ]
[]
[]
0
false
[ "[CLS]_", "Wro", "ng_", "number_", "of_", "arguments_", "in_", "a_", "call_", "[SEP]_", "class_", "Auto", "Fix", "ture", "Base_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "process", "\\u", "field_", "(_", "self_", ",_", "instance_", ",_", "field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "get", "\\u", "value_", "(_", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "value_", "is_", "self_", "._", "IGNORE", "\\u", "FIELD_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "setattr_", "(_", "instance_", ",_", "field_", "._", "name_", ",_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Auto", "Fix", "ture", "Base_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "process", "\\u", "m2", "m_", "(_", "self_", ",_", "instance_", ",_", "field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "check", " ", "django", "'", "s", " ", "version", " ", "number", " ", "to", " ", "dete", "rmin", "e", " ", "how", " ", "interm", "edia", "ry", " ", "models_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "are", " ", "checke", "d", " ", "if", " ", "the", "y", " ", "are", " ", "auto", " ", "created", " ", "or", " ", "not", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "auto", "\\u", "created", "\\u", "through", "\\u", "model_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "through_", "=_", "get", "\\u", "remote", "\\u", "field_", "(_", "field_", ")_", "._", "through_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "auto", "\\u", "created", "\\u", "through", "\\u", "model_", "=_", "through_", "._", "\\u", "meta_", "._", "auto", "\\u", "created_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "auto", "\\u", "created", "\\u", "through", "\\u", "model_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "process", "\\u", "field_", "(_", "instance_", ",_", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "if", " ", "m2", "m", " ", "relation", " ", "has", " ", "interm", "edia", "ry", " ", "model", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "*", " ", "only", " ", "generat", "e", " ", "relation", " ", "if", " ", "'", "generat", "e\\u", "m2", "m", "'", " ", "is", " ", "given_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "*", " ", "first", " ", "generat", "e", " ", "interm", "edia", "ry", " ", "model", " ", "and", " ", "assign", " ", "a", " ", "newl", "y", " ", "created_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "relate", "d", " ", "model", " ", "to", " ", "the", " ", "foreign", "key_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "kwargs_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "field_", "._", "name_", "in_", "self_", "._", "generat", "e\\u", "m2", "m_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "get", " ", "fk", " ", "to", " ", "relate", "d", " ", "model", " ", "on", " ", "interm", "edia", "ry", " ", "model_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "relate", "d\\u", "fk", "s_", "=_", "[_", "fk_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "fk_", "in_", "through_", "._", "\\u", "meta_", "._", "fields_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "isinstance_", "(_", "fk_", ",_", "related_", "._", "Fore", "ign", "Key_", ")_", "and_", "get", "\\u", "remote", "\\u", "field", "\\u", "to_", "(_", "fk_", ")_", "is_", "get", "\\u", "remote", "\\u", "field", "\\u", "to_", "(_", "field_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self", "\\u", "fk", "s_", "=_", "[_", "fk_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "fk_", "in_", "through_", "._", "\\u", "meta_", "._", "fields_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "isinstance_", "(_", "fk_", ",_", "related_", "._", "Fore", "ign", "Key_", ")_", "and_", "get", "\\u", "remote", "\\u", "field", "\\u", "to_", "(_", "fk_", ")_", "is_", "self_", "._", "model_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "relate", "d\\u", "fk", "s_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "self", "\\u", "fk", "s_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "relate", "d\\u", "fk_", "=_", "relate", "d\\u", "fk", "s_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self", "\\u", "fk_", "=_", "self", "\\u", "fk", "s_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "min", "\\u", "count_", ",_", "max", "\\u", "count_", "=_", "self_", "._", "generat", "e\\u", "m2", "m_", "[_", "field_", "._", "name_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "interm", "edia", "ry", "\\u", "model_", "=_", "generators_", "._", "Multipl", "e", "Insta", "nce", "Generator_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "Auto", "Fixture_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "through_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "field", "\\u", "values_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "self", "\\u", "fk_", "._", "name_", ":_", "instance_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "relate", "d\\u", "fk_", "._", "name_", ":_", "generators_", "._", "Insta", "nce", "Generator_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "autof", "ix", "ture_", "._", "get_", "(_", "get", "\\u", "remote", "\\u", "field", "\\u", "to_", "(_", "field_", ")_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "min", "\\u", "count_", "=_", "min", "\\u", "count_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "max", "\\u", "count_", "=_", "max", "\\u", "count_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "**_", "kwargs_", ")_", "._", "generate_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Auto", "Fix", "ture", "Base_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "check", "\\u", "constraints_", "(_", "self_", ",_", "instance_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "field", "names", " ", "whi", "ch", " ", "need", " ", "recalc", "ulation", ".", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "recalc", "\\u", "fields_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "constraint_", "in_", "self_", "._", "constraints_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "constraint_", "(_", "self_", "._", "model_", ",_", "instance_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "constraints_", "._", "Inva", "lid", "Constraint_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "recalc", "\\u", "fields_", "._", "extend_", "(_", "e_", "._", "fields_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "recalc", "\\u", "fields_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Auto", "Fix", "ture", "Base_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "post", "\\u", "process", "\\u", "instance_", "(_", "self_", ",_", "instance_", ",_", "commit_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "\\", "10", ";", " ", " ", " ", " ", "Over", "write", " ", "this", " ", "method", " ", "to", " ", "modif", "y", " ", "the", " ", "created", " ", "*", "instance", "*", " ", "bef", "ore", " ", "it", " ", "gets", "\\", "10", ";", " ", " ", " ", " ", "return", "ed", " ", "by", " ", "the", " ", ":", "meth", ":`", "create", "`", " ", "or", " ", ":", "meth", ":`", "create", "\\u", "one", "`.", "\\", "10", ";", " ", " ", " ", " ", "It", " ", "gets", " ", "the", " ", "generat", "ed", " ", "*", "instance", "*", " ", "and", " ", "must", " ", "return", " ", "the", " ", "modifi", "ed", "\\", "10", ";", " ", " ", " ", " ", "instance", ".", " ", "The", " ", "*", "commit", "*", " ", "parameter", " ", "indicat", "es", " ", "the", " ", "*", "commit", "*", " ", "value", " ", "tha", "t", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "user", " ", "pass", "ed", " ", "int", "o", " ", "the", " ", ":", "meth", ":`", "create", "`", " ", "method", ".", " ", "It", " ", "default", "s", " ", "to", " ", "``", "Tru", "e", "``", "\\", "10", ";", " ", " ", " ", " ", "and", " ", "shou", "ld", " ", "be", " ", "respec", "ted", ",", " ", "whi", "ch", " ", "means", " ", "if", " ", "it", " ", "is", " ", "set", " ", "to", " ", "``", "Fal", "se", "``", ",", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "*", "instance", "*", " ", "shou", "ld", " ", "not", " ", "be", " ", "saved", ".", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "instance_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Auto", "Fix", "ture", "Base_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pre", "\\u", "process", "\\u", "instance_", "(_", "self_", ",_", "instance_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "\\", "10", ";", " ", " ", " ", " ", "Sam", "e", " ", "as", " ", ":", "meth", ":`", "post", "\\u", "process", "\\u", "instance", "`", ",", " ", "but", " ", "it", " ", "is", " ", "bei", "ng", " ", "call", "ed", " ", "bef", "ore", "\\", "10", ";", " ", " ", " ", " ", "saving", " ", "an", " ", "*", "instance", "*.", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "instance_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Auto", "Fix", "ture", "Base_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "create", "\\u", "one_", "(_", "self_", ",_", "commit_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "\\", "10", ";", " ", " ", " ", " ", "Creat", "e", " ", "and", " ", "return", " ", "one", " ", "model", " ", "instance", ".", " ", "If", " ", "*", "commit", "*", " ", "is", " ", "``", "Fal", "se", "``", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "instance", " ", "will", " ", "not", " ", "be", " ", "saved", " ", "and", " ", "many", " ", "to", " ", "many", " ", "relation", "s", " ", "will", " ", "not", " ", "be", "\\", "10", ";", " ", " ", " ", " ", "process", "ed", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lasse", "s", " ", "tha", "t", " ", "override", " ", "``", "create", "\\u", "one", "``", " ", "can", " ", "speci", "fy", " ", "arbitra", "ry", " ", "keyw", "ord", "\\", "10", ";", " ", " ", " ", " ", "argu", "ment", "s", ".", " ", "The", "y", " ", "will", " ", "be", " ", "pass", "ed", " ", "through", " ", "by", " ", "the", "\\", "10", ";", " ", " ", " ", " ", ":", "meth", ":`", "autof", "ix", "ture", ".", "base", ".", "Auto", "Fix", "ture", ".", "create", "`", " ", "method", " ", "and", " ", "the", " ", "help", "er", "\\", "10", ";", " ", " ", " ", " ", "function", "s", " ", ":", "func", ":`", "autof", "ix", "ture", ".", "create", "`", " ", "and", "\\", "10", ";", " ", " ", " ", " ", ":", "func", ":`", "autof", "ix", "ture", ".", "create", "\\u", "one", "`.", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Ma", "y", " ", "raise", " ", ":", "exc", ":`", "Creat", "e", "Insta", "nce", "Error", "`", " ", "if", " ", "constraint", "s", " ", "are", " ", "not", " ", "satisfied", ".", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tries_", "=_", "self_", "._", "tries_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "instance_", "=_", "self_", "._", "model_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "process_", "=_", "instance_", "._", "\\u", "meta_", "._", "fields_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "process_", "and_", "tries_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "field_", "in_", "process_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "process", "\\u", "field_", "(_", "instance_", ",_", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "process_", "=_", "self_", "._", "check", "\\u", "constraints_", "(_", "instance_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tries_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "tries_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Creat", "e", "Insta", "nce", "Error_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "Cann", "ot", " ", "solve", " ", "constraint", "s", " ", "for", " ", "\"%", "s", "\",", " ", "trie", "d", " ", "%", "d", " ", "times", ".", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "Ple", "ase", " ", "check", " ", "value", " ", "generat", "ors", " ", "or", " ", "model", " ", "constraint", "s", ".", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "At", " ", "leas", "t", " ", "the", " ", "follow", "ing", " ", "fields", " ", "are", " ", "involved", ":", " ", "%", "s", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'%", "s", ".", "%", "s", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "model_", "._", "\\u", "meta_", "._", "app", "\\u", "label_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "model_", "._", "\\u", "meta_", "._", "object\\u", "name_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "tries_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "',", " ", "'_", "._", "join_", "(_", "[_", "field_", "._", "name_", "for_", "field_", "in_", "process_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "instance_", "=_", "self_", "._", "pre", "\\u", "process", "\\u", "instance_", "(_", "instance_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "commit_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "instance_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "to", " ", "handle", " ", "partic", "ular", " ", "case", " ", "of", " ", "Gene", "ric", "Relation_", "\\u\\u\\uNL\\u\\u\\u_", "#", "in", " ", "Dj", "ang", "o", " ", "pre", " ", "1.6", " ", "it", " ", "appear", "s", " ", "in", " ", ".", "many", "\\u", "to", "\\u", "many_", "\\u\\u\\uNL\\u\\u\\u_", "many", "\\u", "to", "\\u", "many_", "=_", "[_", "f_", "for_", "f_", "in_", "instance_", "._", "\\u", "meta_", "._", "many", "\\u", "to", "\\u", "many_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "isinstance_", "(_", "f_", ",_", "get", "\\u", "Gene", "ric", "Relation_", "(_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "field_", "in_", "many", "\\u", "to", "\\u", "many_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "process", "\\u", "m2", "m_", "(_", "instance_", ",_", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "signals_", "._", "instance", "\\u", "created_", "._", "send_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "sender_", "=_", "self_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "model_", "=_", "self_", "._", "model_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "instance_", "=_", "instance_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "committ", "ed_", "=_", "commit_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "post", "\\u", "process", "\\u", "kwargs_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "'", "commit", "'_", "in_", "geta", "rg", "names_", "(_", "self_", "._", "post", "\\u", "process", "\\u", "instance_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "post", "\\u", "process", "\\u", "kwargs_", "[_", "'", "commit", "'_", "]_", "=_", "commit_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "warnings_", "._", "warn_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Subc", "lasse", "s", " ", "of", " ", "Auto", "Fix", "ture", " ", "need", " ", "to", " ", "provide", " ", "a", " ", "`", "commit", "`", " ", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "argu", "ment", " ", "for", " ", "post", "\\u", "process", "\\u", "instance", " ", "method", "s", "\"_", ",_", "Dep", "reca", "tion", "Warning_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Comparison of constants
cloudera/hue/apps/oozie/src/oozie/utils.py
[ { "content": "def smart_path(path, mapping, is_coordinator=False):\n # Try to prepend home_dir and FS scheme if needed.\n # If path starts by a parameter try to get its value from the list of parameters submitted by the user or the coordinator.\n # This dynamic checking enable the use of <prepares> statements in a workflow scheduled manually of by a coordinator.\n # The logic is a bit complicated but Oozie is not consistent with data paths, prepare, coordinator paths and Fs action.\n if not path.startswith('$') and not path.startswith('/') and not urlparse.urlsplit(path).scheme:\n path = '/user/%(username)s/%(path)s' % {\n 'username': '${coord:user()}' if is_coordinator else '${wf:user()}',\n 'path': path\n }\n\n if path.startswith('$'):\n variables = find_variables(path)\n for var in variables:\n prefix = '${%s}' % var\n if path.startswith(prefix):\n if var in mapping:\n if not urlparse.urlsplit(mapping[var]).scheme and not mapping[var].startswith('$'):\n path = '%(nameNode)s%(path)s' % {'nameNode': '${nameNode}', 'path': path}\n else:\n if not urlparse.urlsplit(path).scheme:\n path = '%(nameNode)s%(path)s' % {'nameNode': '${nameNode}', 'path': path}\n\n return path", "metadata": "root.smart_path", "header": "['module', '___EOS___']", "index": 99 } ]
[]
[]
0
true
[ "[CLS]_", "Compari", "son_", "of_", "constants_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "smart", "\\u", "path_", "(_", "path_", ",_", "mapping_", ",_", "is", "\\u", "coordinator", "_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Tr", "y", " ", "to", " ", "prepend", " ", "home", "\\u", "dir", " ", "and", " ", "FS", " ", "sche", "me", " ", "if", " ", "need", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "path", " ", "starts", " ", "by", " ", "a", " ", "parameter", " ", "try", " ", "to", " ", "get", " ", "its", " ", "value", " ", "from", " ", "the", " ", "list", " ", "of", " ", "parameter", "s", " ", "submitted", " ", "by", " ", "the", " ", "user", " ", "or", " ", "the", " ", "coordinator", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "dynami", "c", " ", "checking", " ", "enable", " ", "the", " ", "use", " ", "of", " ", "<", "prepar", "es", ">", " ", "statem", "ents", " ", "in", " ", "a", " ", "workf", "low", " ", "schedule", "d", " ", "manu", "ally", " ", "of", " ", "by", " ", "a", " ", "coordinator", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "logic", " ", "is", " ", "a", " ", "bit", " ", "compli", "cated", " ", "but", " ", "Oo", "zie", " ", "is", " ", "not", " ", "consistent", " ", "with", " ", "data", " ", "path", "s", ",", " ", "prepar", "e", ",", " ", "coordinator", " ", "path", "s", " ", "and", " ", "Fs", " ", "action", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "path_", "._", "startswith_", "(_", "'$'_", ")_", "and_", "not_", "path_", "._", "startswith_", "(_", "'/'_", ")_", "and_", "not_", "urlparse_", "._", "urlsplit_", "(_", "path_", ")_", "._", "scheme_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "'/", "user", "/", "%", "(", "user", "name", ")", "s", "/", "%", "(", "path", ")", "s", "'_", "%_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "user", "name", "'_", ":_", "'$", "{", "coord", ":", "user", "()}", "'_", "if_", "is", "\\u", "coordinator", "_", "else_", "'$", "{", "wf", ":", "user", "()}", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "path", "'_", ":_", "path_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "path_", "._", "startswith_", "(_", "'$'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "variables_", "=_", "find", "\\u", "variables_", "(_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "var_", "in_", "variables_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "prefix_", "=_", "'$", "{%", "s", "}'_", "%_", "var_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "path_", "._", "startswith_", "(_", "prefix_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "var_", "in_", "mapping_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "urlparse_", "._", "urlsplit_", "(_", "mapping_", "[_", "var_", "]_", ")_", "._", "scheme_", "and_", "not_", "mapping_", "[_", "var_", "]_", "._", "startswith_", "(_", "'$'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "'%", "(", "name", "Node", ")", "s", "%", "(", "path", ")", "s", "'_", "%_", "{_", "'", "name", "Node", "'_", ":_", "'$", "{", "name", "Node", "}'_", ",_", "'", "path", "'_", ":_", "path_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "urlparse_", "._", "urlsplit_", "(_", "path_", ")_", "._", "scheme_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "'%", "(", "name", "Node", ")", "s", "%", "(", "path", ")", "s", "'_", "%_", "{_", "'", "name", "Node", "'_", ":_", "'$", "{", "name", "Node", "}'_", ",_", "'", "path", "'_", ":_", "path_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Use of the return value of a procedure
gdanezis/petlib/examples/tormedian.py
[ { "content": " def dump(self):\n from cStringIO import StringIO\n from struct import pack\n\n dst = StringIO()\n dst.write(pack(\"II\", self.d, self.w))\n\n for di in range(self.d):\n for wi in range(self.w):\n ba = self.store[di][wi].a.export()\n dst.write(pack(\"I\", len(ba)))\n dst.write(ba)\n \n bb = self.store[di][wi].b.export()\n dst.write(pack(\"I\", len(bb)))\n dst.write(bb)\n\n return dst.getvalue()", "metadata": "root.CountSketchCt.dump", "header": "['class', 'CountSketchCt', '(', 'object', ')', ':', '___EOS___']", "index": 175 } ]
[]
[]
0
false
[ "[CLS]_", "Use_", "of_", "the_", "return_", "value_", "of_", "a_", "procedure_", "[SEP]_", "class_", "Count", "Sketch", "Ct", "_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "dump_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "c", "String", "IO_", "import_", "String", "IO_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "struct_", "import_", "pack_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "dst_", "=_", "String", "IO_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dst_", "._", "write_", "(_", "pack_", "(_", "\"", "II", "\"_", ",_", "self_", "._", "d_", ",_", "self_", "._", "w_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "di_", "in_", "range_", "(_", "self_", "._", "d_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "wi", "_", "in_", "range_", "(_", "self_", "._", "w_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ba_", "=_", "self_", "._", "store_", "[_", "di_", "]_", "[_", "wi", "_", "]_", "._", "a_", "._", "export_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dst_", "._", "write_", "(_", "pack_", "(_", "\"", "I", "\"_", ",_", "len_", "(_", "ba_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dst_", "._", "write_", "(_", "ba_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "bb_", "=_", "self_", "._", "store_", "[_", "di_", "]_", "[_", "wi", "_", "]_", "._", "b_", "._", "export_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dst_", "._", "write_", "(_", "pack_", "(_", "\"", "I", "\"_", ",_", "len_", "(_", "bb_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dst_", "._", "write_", "(_", "bb_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "dst_", "._", "getvalue_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
natano/python-git-orm/git_orm/__init__.py
[ { "content": "__version__ = '0.4'\n__author__ = 'Martin Natano <[email protected]>'\n\n\n_repository = None\n_branch = 'git-orm'\n_remote = 'origin'\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class GitError(Exception): pass", "metadata": "root.GitError", "header": "['module', '___EOS___']", "index": 9 }, { "content": "def set_repository(value):\n from pygit2 import discover_repository, Repository\n global _repository\n if value is None:\n _repository = None\n return\n try:\n path = discover_repository(value)\n except KeyError:\n raise GitError('no repository found in \"{}\"'.format(value))\n _repository = Repository(path)", "metadata": "root.set_repository", "header": "['module', '___EOS___']", "index": 11 }, { "content": "def get_repository():\n return _repository", "metadata": "root.get_repository", "header": "['module', '___EOS___']", "index": 23 }, { "content": "def set_branch(value):\n global _branch\n _branch = value", "metadata": "root.set_branch", "header": "['module', '___EOS___']", "index": 27 }, { "content": "def get_branch():\n return _branch", "metadata": "root.get_branch", "header": "['module', '___EOS___']", "index": 31 }, { "content": "def set_remote(value):\n global _remote\n _remote = value", "metadata": "root.set_remote", "header": "['module', '___EOS___']", "index": 35 }, { "content": "def get_remote():\n return _remote", "metadata": "root.get_remote", "header": "['module', '___EOS___']", "index": 39 } ]
[]
[]
0
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u", "version\\u\\u_", "=_", "'", "0.", "4", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u", "author\\u\\u_", "=_", "'", "Mart", "in", " ", "Nat", "ano", " ", "<", "nat", "ano", "@", "nat", "ano", ".", "net", ">'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "repository_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "branch_", "=_", "'", "git", "-", "orm", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "remote_", "=_", "'", "orig", "in", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Git", "Error_", "(_", "Exception_", ")_", ":_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "set\\u", "repository_", "(_", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "pyg", "it", "2_", "import_", "discove", "r", "\\u", "repository_", ",_", "Repository_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "global_", "\\u", "repository_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "value_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\\u", "repository_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "discove", "r", "\\u", "repository_", "(_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Key", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Git", "Error_", "(_", "'", "no", " ", "repos", "itor", "y", " ", "found", " ", "in", " ", "\"{}\"'_", "._", "format_", "(_", "value_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u", "repository_", "=_", "Repository_", "(_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "repository_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\\u", "repository_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set\\u", "branch_", "(_", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "global_", "\\u", "branch_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "branch_", "=_", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "branch_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\\u", "branch_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set\\u", "remote_", "(_", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "global_", "\\u", "remote_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "remote_", "=_", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "remote_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\\u", "remote_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
AppScale/appscale/AppServer/lib/django-1.5/django/utils/regex_helper.py
[ { "content": "def flatten_result(source):\n \"\"\"\n Turns the given source sequence into a list of reg-exp possibilities and\n their arguments. Returns a list of strings and a list of argument lists.\n Each of the two lists will be of the same length.\n \"\"\"\n if source is None:\n return [''], [[]]\n if isinstance(source, Group):\n if source[1] is None:\n params = []\n else:\n params = [source[1]]\n return [source[0]], [params]\n result = ['']\n result_args = [[]]\n pos = last = 0\n for pos, elt in enumerate(source):\n if isinstance(elt, six.string_types):\n continue\n piece = ''.join(source[last:pos])\n if isinstance(elt, Group):\n piece += elt[0]\n param = elt[1]\n else:\n param = None\n last = pos + 1\n for i in range(len(result)):\n result[i] += piece\n if param:\n result_args[i].append(param)\n if isinstance(elt, (Choice, NonCapture)):\n if isinstance(elt, NonCapture):\n elt = [elt]\n inner_result, inner_args = [], []\n for item in elt:\n res, args = flatten_result(item)\n inner_result.extend(res)\n inner_args.extend(args)\n new_result = []\n new_args = []\n for item, args in zip(result, result_args):\n for i_item, i_args in zip(inner_result, inner_args):\n new_result.append(item + i_item)\n new_args.append(args[:] + i_args)\n result = new_result\n result_args = new_args\n if pos >= last:\n piece = ''.join(source[last:])\n for i in range(len(result)):\n result[i] += piece\n return result, result_args", "metadata": "root.flatten_result", "header": "['module', '___EOS___']", "index": 289 } ]
[]
[]
0
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flat", "ten", "\\u", "result_", "(_", "source_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Turn", "s", " ", "the", " ", "give", "n", " ", "source", " ", "sequence", " ", "int", "o", " ", "a", " ", "list", " ", "of", " ", "reg", "-", "exp", " ", "possibilit", "ies", " ", "and", "\\", "10", ";", " ", " ", " ", " ", "thei", "r", " ", "argu", "ment", "s", ".", " ", "Return", "s", " ", "a", " ", "list", " ", "of", " ", "string", "s", " ", "and", " ", "a", " ", "list", " ", "of", " ", "argu", "ment", " ", "lists", ".", "\\", "10", ";", " ", " ", " ", " ", "Ea", "ch", " ", "of", " ", "the", " ", "two", " ", "lists", " ", "will", " ", "be", " ", "of", " ", "the", " ", "same", " ", "length", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "source_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "[_", "''_", "]_", ",_", "[_", "[_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "isinstance_", "(_", "source_", ",_", "Group_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "source_", "[_", "1_", "]_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "params_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "params_", "=_", "[_", "source_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "[_", "source_", "[_", "0_", "]_", "]_", ",_", "[_", "params_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "=_", "[_", "''_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result", "\\u", "args_", "=_", "[_", "[_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pos_", "=_", "last_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "pos_", ",_", "elt_", "in_", "enumerate_", "(_", "source_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "elt_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "piece_", "=_", "''_", "._", "join_", "(_", "source_", "[_", "last_", ":_", "pos_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "isinstance_", "(_", "elt_", ",_", "Group_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "piece_", "+=_", "elt_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "param_", "=_", "elt_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "param_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "last_", "=_", "pos_", "+_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "len_", "(_", "result_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "result_", "[_", "i_", "]_", "+=_", "piece_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "param_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "result", "\\u", "args_", "[_", "i_", "]_", "._", "append_", "(_", "param_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "isinstance_", "(_", "elt_", ",_", "(_", "Choice_", ",_", "Non", "Capture_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "elt_", ",_", "Non", "Capture_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "elt_", "=_", "[_", "elt_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "inner", "\\u", "result_", ",_", "inner", "\\u", "args_", "=_", "[_", "]_", ",_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "item_", "in_", "elt_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "res_", ",_", "args_", "=_", "flat", "ten", "\\u", "result_", "(_", "item_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "inner", "\\u", "result_", "._", "extend_", "(_", "res_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "inner", "\\u", "args_", "._", "extend_", "(_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "new", "\\u", "result_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "args_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "item_", ",_", "args_", "in_", "zip_", "(_", "result_", ",_", "result", "\\u", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "i", "\\u", "item_", ",_", "i", "\\u", "args_", "in_", "zip_", "(_", "inner", "\\u", "result_", ",_", "inner", "\\u", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "new", "\\u", "result_", "._", "append_", "(_", "item_", "+_", "i", "\\u", "item_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "args_", "._", "append_", "(_", "args_", "[_", ":_", "]_", "+_", "i", "\\u", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "=_", "new", "\\u", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result", "\\u", "args_", "=_", "new", "\\u", "args_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "pos_", ">=_", "last_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "piece_", "=_", "''_", "._", "join_", "(_", "source_", "[_", "last_", ":_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "len_", "(_", "result_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "result_", "[_", "i_", "]_", "+=_", "piece_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "result_", ",_", "result", "\\u", "args_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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