Exemple #1
0
 def test_getSeriesKey_refuses_names_with_wrong_number_of_fields(self):
     # getSeriesKey requires exactly three fields.
     self.assertIsNone(DebianInstallerUpload.getSeriesKey(
         "package_1.0.tar.gz"))
     self.assertIsNone(DebianInstallerUpload.getSeriesKey(
         "one_two_three_four_5.tar.gz"))
Exemple #2
0
 def test_getSeriesKey_extracts_architecture(self):
     # getSeriesKey extracts the architecture from an upload's filename.
     self.openArchive()
     self.assertEqual(
         self.arch, DebianInstallerUpload.getSeriesKey(self.path))
Exemple #3
0
 def test_getSeriesKey_returns_None_on_mismatch(self):
     # getSeriesKey returns None if the filename does not match the
     # expected pattern.
     self.assertIsNone(DebianInstallerUpload.getSeriesKey("argh_1.0.jpg"))
 def process(self):
     self.tarfile.close()
     self.buffer.close()
     DebianInstallerUpload().process(self.archive, self.path, self.suite)