def test_force_detect_on_new_detector(self, _): uut = DetectorRun(self.detector, self.version, self.findings_path) uut._execute = MagicMock() uut.is_success = lambda: True uut.is_outdated = lambda _: True uut.ensure_executed(self.detector_args, None, False, 0, 0, self.logger) uut._execute.assert_called_with(ANY, None, 0, ANY)
def test_skips_detect_if_previous_run_was_error(self, _): uut = DetectorRun(self.detector, self.version, self.findings_path) uut._execute = MagicMock() uut.is_outdated = lambda _: False uut.is_error = lambda: True uut.ensure_executed(self.detector_args, None, False, 0, 0, self.logger) uut._execute.assert_not_called()