def test_format_state_multiple(self): job1 = hrr.PbsJob('123', 'R', 'host1') job2 = hrr.PbsJob('abc', 'Q', '') expected = 'Found 2 jobs\n Id 123 State R Node host1\n Id abc State Q Node ' self.assertTrue(expected, hrr.format_state([job1, job2]))
def test_format_state_single(self): job = hrr.PbsJob('123', 'R', 'host1') expected = 'Found 1 job Id 123 State R Node host1' self.assertTrue(expected, hrr.format_state([job]))
def test_format_state_none(self): expected = 'No jobs found' self.assertTrue(expected, hrr.format_state([]))