def test_parseJob_v5_invalid_json(self): sched = trysched.Try_Jobdir( name='tsched', builderNames=['buildera', 'builderb'], jobdir='foo') jobstr = self.makeNetstring('5', '{"comment": "com}') self.assertRaises( trysched.BadJobfile, sched.parseJob, StringIO.StringIO(jobstr))
def test_parseJob_invalid(self): sched = trysched.Try_Jobdir( name='tsched', builderNames=['a'], jobdir='foo') self.assertRaises( trysched.BadJobfile, sched.parseJob, StringIO.StringIO('this is not a netstring'))
def test_parseJob_invalid_version(self): sched = trysched.Try_Jobdir( name='tsched', builderNames=['a'], jobdir='foo') self.assertRaises( trysched.BadJobfile, sched.parseJob, StringIO.StringIO('1:9,'))
def test_parseJob_empty(self): sched = trysched.Try_Jobdir(name='tsched', builderNames=['a'], jobdir='foo') self.assertRaises(trysched.BadJobfile, sched.parseJob, NativeStringIO(''))