+ def test_unpack(self):
+ '''
+ Tests the UnpackedSource class.
+ '''
+ self.setup_poolfiles()
+ dscfilename = fixture('ftp/pool/' + self.file['hello_2.2-1.dsc'].filename)
+ unpacked = UnpackedSource(dscfilename)
+ self.assertTrue(len(unpacked.get_root_directory()) > 0)
+ self.assertEqual('hello (2.2-1) unstable; urgency=low\n',
+ unpacked.get_changelog_file().readline())
+ all_filenames = set(unpacked.get_all_filenames())
+ self.assertEqual(8, len(all_filenames))
+ self.assertTrue('debian/rules' in all_filenames)
+ self.assertRaises(CalledProcessError, lambda: UnpackedSource('invalidname'))
+