MCPcopy Create free account
hub / github.com/Rello/analytics / fetch

Method fetch

tests/sbom/test_scan.py:18–22  ·  view source on GitHub ↗
(url, payload)

Source from the content-addressed store, hash-verified

16 def test_pagination_withdrawals_and_unknown_versions(self):
17 calls = []
18 def fetch(url, payload):
19 calls.append(payload.copy())
20 if 'page_token' not in payload:
21 return {'vulns': [ADVISORY], 'next_page_token': 'page2'}
22 return {'vulns': [ADVISORY, {'id': 'withdrawn', 'withdrawn': '2026-01-01'}]}
23 report = scanner.scan({'components': BOM['components'] + [{'name': 'unknown', 'version': 'unknown'}]}, fetch)
24 self.assertEqual(len(report['findings']), 1)
25 self.assertEqual(len(report['skipped']), 1)

Callers 15

getChangesMethod · 0.80
copyReportMethod · 0.80
fixSharesMethod · 0.80
fixThresholdMethod · 0.80
fixParentsMethod · 0.80
postSchemaChangeMethod · 0.80
postSchemaChangeMethod · 0.80
postSchemaChangeMethod · 0.80
getSourceNameMethod · 0.80
copyMethod · 0.80
getDataloadByIdMethod · 0.80
readOwnByIdMethod · 0.80

Calls 2

appendMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected