def testBasic(self):
     """Simple smoke test"""
     tbs_base = 'gs://some-bucket'
     insns_path = 'chan/board/ver/file.instructions'
     tbs_file = '%s/tobesigned/90,chan,board,ver,file.instructions' % tbs_base
     ret = pushimage.MarkImageToBeSigned(self.ctx, tbs_base, insns_path, 90)
     self.assertEqual(ret, tbs_file)
 def testTbsUpload(self):
     """Make sure we actually try to upload the file"""
     pushimage.MarkImageToBeSigned(self.ctx, '', '', 50)
     self.gs_mock.assertCommandContains(['cp', '--'])
 def testPriority(self):
     """Verify diff priority values get used correctly"""
     for prio, sprio in ((0, '00'), (9, '09'), (35, '35'), (99, '99')):
         ret = pushimage.MarkImageToBeSigned(self.ctx, '', '', prio)
         self.assertEquals(ret, '/tobesigned/%s,' % sprio)