def test_capure_stdout(self):
        config["jobtype_capture_process_output"] = True
        jobtype = JobType(fake_assignment())

        with patch.object(process_stdout, "info") as mocked:
            jobtype.log_stdout_line(Mock(id=1), "stdout")

        mocked.assert_called_once_with("task %r: %s", 1, "stdout")
    def test_no_capure_stdout(self):
        config["jobtype_capture_process_output"] = False
        protocol = Mock(id=3, pid=33)
        jobtype = JobType(fake_assignment())
        logpool.open_log(jobtype.uuid, self.create_file(), ignore_existing=True)

        with patch.object(logpool, "log") as mocked:
            jobtype.log_stdout_line(protocol, "stdout")

        mocked.assert_called_once_with(jobtype.uuid, STDOUT, "stdout", 33)