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

Method api

tests/sbom/test_scan.py:41–48  ·  view source on GitHub ↗
(path, method='GET', payload=None)

Source from the content-addressed store, hash-verified

39 report = scanner.scan(BOM, lambda *args: {'vulns': [ADVISORY]})
40 issues, writes = [], []
41 def api(path, method='GET', payload=None):
42 if method == 'GET':
43 return issues.copy()
44 writes.append((method, payload))
45 if method == 'POST':
46 issues.append(dict(payload, number=1, state='open'))
47 else:
48 issues[0].update(payload)
49 scanner.reconcile(report, 'owner/repo', api)
50 self.assertEqual(len(writes), 1)
51 scanner.reconcile(report, 'owner/repo', api)

Callers 2

visualization.jsFile · 0.80
sFunction · 0.80

Calls 3

appendMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected