MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / test_ubuntu_usn

Function test_ubuntu_usn

vulnerabilities/tests/test_ubuntu_usn.py:29–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def test_ubuntu_usn():
30 database = os.path.join(TEST_DIR, "database-all.json.bz2")
31 with open(database, "rb") as f:
32 raw_data = f.read()
33 db = json.loads(bz2.decompress(raw_data))
34 advisories = UbuntuUSNImporter().to_advisories(db)
35 expected_file = os.path.join(TEST_DIR, f"ubuntu-usn-expected.json")
36 result = [data.to_dict() for data in list(advisories)]
37 util_tests.check_results_against_json(result, expected_file)

Callers

nothing calls this directly

Calls 3

UbuntuUSNImporterClass · 0.90
to_advisoriesMethod · 0.45
to_dictMethod · 0.45

Tested by

no test coverage detected