test_a_cyclonedx_sbom_reads_the_same_shape

Tests › tests/test_wiki_sbom.py

passed Passed in the packaged run.

What this test is for

Why it exists

CycloneDX JSON: metadata's component, components with expression licences and purls.

Given

  1. —
→

When

  1. package, components = read_sbom(_write(tmp_path, "bom.cdx.json", _CDX))
→

Then

  1. ✓ package equals ("demo", "MIT")
  2. ✓ components equals [ Component("left-pad", "1.3.0", "WTFPL", "library", "pkg:npm/left-pad@1.3.0", "SHA-256:cd34") ]

tests/test_wiki_sbom.py:86 · its file's page

What it checks (2)

  1. assert package == ("demo", "MIT") not attributed
  2. assert components == [ Component("left-pad", "1.3.0", "WTFPL", "library", "pkg:npm/left-pad@1.3.0", "SHA-256:cd34") ] not attributed

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_a_cyclonedx_sbom_reads_the_same_shape→read_sbom→_write

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

test_a_cyclonedx_sbom_reads_the_same_shape · 2 checksread_sbomREQ-DDB-WIKI-051 · measured
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.