Пример #1
0
 def test_common_name_suffix_long(self):
     upload = SigningUpload()
     common_name = upload.generateKeyCommonName('t' * 40, 'p' * 40,
                                                'kmod-plus')
     expected_name = 'PPA ' + 't' * 40 + ' ' + 'p' * 9 + ' kmod-plus'
     self.assertEqual(expected_name, common_name)
     self.assertEqual(64, len(common_name))
Пример #2
0
 def test_common_name_suffix_just_short(self):
     upload = SigningUpload()
     common_name = upload.generateKeyCommonName('t' * 30, 'p' * 24, 'kmod')
     expected_name = 'PPA ' + 't' * 30 + ' ' + 'p' * 24 + ' kmod'
     self.assertEqual(expected_name, common_name)
     self.assertEqual(64, len(common_name))
Пример #3
0
 def test_common_name_plain_long(self):
     upload = SigningUpload()
     common_name = upload.generateKeyCommonName('t' * 40, 'p' * 40)
     expected_name = 'PPA ' + 't' * 40 + ' ' + 'p' * 19
     self.assertEqual(expected_name, common_name)
     self.assertEqual(64, len(common_name))
Пример #4
0
 def test_common_name_suffix(self):
     upload = SigningUpload()
     common_name = upload.generateKeyCommonName('testing-team', 'ppa',
                                                'kmod')
     self.assertEqual('PPA testing-team ppa kmod', common_name)