Commit c683aa88 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

add test

parent 5b3fe252
......@@ -44,6 +44,13 @@ class TestSlurmControl(unittest.TestCase):
with self.assertRaises(slurm_control.SlurmCallError):
_ = slurm_control.get_jobs_status()
def test_get_job_statuses_job_id_list_missing(self, call_mock):
output_string = '1;test_job;CD;COMPLETED;None\n2;test_job;F;FAILED;error 1\n'
call_mock.return_value = get_mocked_call_output(0, output_string, 'stuff')
_ = slurm_control.get_jobs_status(['1', '2'])
self.assertIn('1,2', call_mock.call_args[0][0])
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s-%(name)s-%(levelname)s %(message)s')
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment