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

Function test_advisories

vulnerabilities/tests/test_ruby.py:40–47  ·  view source on GitHub ↗
(filename, expected_filename, schema_type)

Source from the content-addressed store, hash-verified

38 ],
39)
40def test_advisories(filename, expected_filename, schema_type):
41 file_path = os.path.join(TEST_DATA, filename)
42 mock_response = load_yaml(file_path)
43 results = parse_ruby_advisory(
44 mock_response, schema_type, "https://github.com/rubysec/ruby-advisory-db"
45 ).to_dict()
46 expected_file = os.path.join(TEST_DATA, expected_filename)
47 check_results_against_json(results=results, expected_file=expected_file)
48
49
50@patch("vulnerabilities.improvers.valid_versions.RubyImprover.get_package_versions")

Callers

nothing calls this directly

Calls 4

load_yamlFunction · 0.90
parse_ruby_advisoryFunction · 0.90
to_dictMethod · 0.45

Tested by

no test coverage detected