Esempio n. 1
0
 def parse(cls, location):
     # TODO: we cannot know the distro from the name only
     yield build_package_data(
         debian_data=get_paragraph_data_from_file(location=location),
         datasource_id=cls.datasource_id,
         package_type=cls.default_package_type,
     )
Esempio n. 2
0
 def test_get_paragraph_data_from_file__signed_from_dsc_does_not_crash_if_signature_not_removed(
         self):
     test_file = self.get_test_loc('debcon/dsc/zlib_1.2.11.dfsg-1.dsc')
     expected_loc = 'debcon/dsc/zlib_1.2.11.dfsg-1.dsc-expected-no-desig.json'
     results = debcon.get_paragraph_data_from_file(
         test_file, remove_pgp_signature=False)
     self.check_json(results, expected_loc, regen=False)
Esempio n. 3
0
 def test_get_paragraph_data_from_file__signed_from_dsc_can_remove_signature(
         self):
     test_file = self.get_test_loc('debcon/dsc/zlib_1.2.11.dfsg-1.dsc')
     expected_loc = 'debcon/dsc/zlib_1.2.11.dfsg-1.dsc-expected.json'
     results = debcon.get_paragraph_data_from_file(
         test_file, remove_pgp_signature=True)
     self.check_json(results, expected_loc, regen=False)
Esempio n. 4
0
 def test_get_paragraph_data_from_file_from_status_with_junk_uses_unknown(
         self):
     test_file = self.get_test_loc('debcon/status/one_status_junk',
                                   must_exist=False)
     expected_loc = 'debcon/status/one_status_junk-expected.json'
     results = debcon.get_paragraph_data_from_file(test_file)
     self.check_json(results, expected_loc, regen=False)
Esempio n. 5
0
 def parse(cls, location):
     # this is typically signed
     debian_data = get_paragraph_data_from_file(
         location=location,
         remove_pgp_signature=True,
     )
     yield build_package_data(
         debian_data=debian_data,
         datasource_id=cls.datasource_id,
         package_type=cls.default_package_type,
     )
Esempio n. 6
0
 def test_get_paragraph_data_from_file_from_status_can_handle_perl_status(
         self):
     test_file = self.get_test_loc('debcon/status/perl_status')
     expected_loc = 'debcon/status/perl_status-expected.json'
     results = debcon.get_paragraph_data_from_file(test_file)
     self.check_json(results, expected_loc, regen=False)
Esempio n. 7
0
 def test_get_paragraph_data_from_file_does_not_crash_on_None(self):
     results = list(debcon.get_paragraph_data_from_file(None))
     assert results == []