コード例 #1
0
 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))
コード例 #2
0
 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'))
コード例 #3
0
 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,'))
コード例 #4
0
 def test_parseJob_empty(self):
     sched = trysched.Try_Jobdir(name='tsched',
                                 builderNames=['a'],
                                 jobdir='foo')
     self.assertRaises(trysched.BadJobfile, sched.parseJob,
                       NativeStringIO(''))