Exemple #1
0
    def test_timed_out(self):
        import subprocess
        subprocess.run = mock.Mock(side_effect=SoftTimeLimitExceeded)

        job = Job(environment_id="12345", command="echo 'HELLO'")
        task = execute_command.run(job)
        assert task['errored_out'] is True
 def test_basic_run(self):
     job = Job(environment_id="12345", command="echo 'HELLO'")
     task = execute_command.run(job)
     assert task['errored_out'] is False
     assert task['output'] == 'HELLO\n'