예제 #1
0
    def test_populate_callback(self):
        """Test the population of the callback object for inspect scan."""
        callback = InspectResultCallback(scan_task=self.scan_task)
        host = Mock()
        host.name = '1.2.3.4'
        task = Mock(args={'_raw_params': 'command line'})
        result = Mock(_host=host, _result={'rc': 3}, _task=task)

        callback.v2_runner_on_unreachable(result)
예제 #2
0
    def test_populate_callback(self):
        """Test the population of the callback object for inspect scan."""
        callback = InspectResultCallback(
            scan_task=self.inspect_scan_task,
            inspect_results=self.inspect_results)
        host = Mock()
        host.name = '1.2.3.4'
        result = Mock(_host=host, _results={'rc': 3})

        callback.v2_runner_on_unreachable(result)