def test_stage_change_boot_variable1(self): self.device.parse = Mock(side_effect=neg_parsed) self.device.configure = Mock(side_effect=KeyError("negative test")) self.device.execute = Mock(side_effect=neg_execute) # Execute stage: change_boot_variable with self.assertRaises(AEtestFailedSignal): change_boot_variable(self.section, self.steps, self.device, **self.device.clean.change_boot_variable)
def test_stage_change_boot_variable2(self): self.device.parse = Mock(side_effect=neg_parsed) self.device.configure = Mock(side_effect=neg_config) self.device.execute = Mock(side_effect=neg_execute) # Execute stage: change_boot_variable with self.assertRaises(TerminateStepSignal): change_boot_variable(self.section, self.steps, self.device, **self.device.clean.change_boot_variable)
def test_stage_change_boot_variable(self): self.device.parse = Mock(side_effect=pos_parsed) self.device.configure = Mock(side_effect=pos_config) self.device.execute = Mock(side_effect=pos_execute) self.device.is_ha = False # Execute stage: change_boot_variable with self.assertRaises(AEtestPassedSignal): change_boot_variable(self.section, self.steps, self.device, **self.device.clean.change_boot_variable)