def test_get_pending_file_rename_false_2(self):
     """
     If one of the value names exists but is not set, should return False
     """
     patched_return = {"success": True, "vdata": "(value not set)"}
     with patch("salt.utils.win_reg.read_value",
                return_value=patched_return):
         self.assertFalse(win_system.get_pending_file_rename())
 def test_get_pending_file_rename_true_1(self):
     """
     If one of the value names exists and is set, should return True
     """
     patched_return = {"success": True, "vdata": "some value"}
     with patch("salt.utils.win_reg.read_value",
                return_value=patched_return):
         self.assertTrue(win_system.get_pending_file_rename())
 def test_get_pending_file_rename_false_1(self):
     """
     If none of the value names exist, should return False
     """
     patched_return = {"success": False}
     with patch("salt.utils.win_reg.read_value",
                return_value=patched_return):
         self.assertFalse(win_system.get_pending_file_rename())
 def test_get_pending_servermanager_true(self):
     """
     If the CurrentRebootAttempts value name exists and is an integer,
     should return True
     """
     patched_return = {"success": True, "vdata": 1}
     with patch("salt.utils.win_reg.read_value",
                return_value=patched_return):
         self.assertTrue(win_system.get_pending_file_rename())
 def test_get_pending_servermanager_false_2(self):
     """
     If the CurrentRebootAttempts value name exists but is not an integer,
     should return False
     """
     patched_return = {"success": True, "vdata": "(value not set)"}
     with patch("salt.utils.win_reg.read_value",
                return_value=patched_return):
         self.assertFalse(win_system.get_pending_file_rename())