test_issue_links_follow_the_declared_or_remote_tracker¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
GITHUB AND AZURE DEVOPS, prefilled; the tracker is declared (`wiki.issues`) or read from the `origin` remote; an unknown host gives no link rather than a guessed one.
Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-020 REQ-DDB-WIKI-021 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052
Given
- —
When
target_from_remote("git@github.com:acme/demo.git")target_from_remote("https://github.com/acme/demo")target_from_remote("https://dev.azure.com/org/proj/_git/repo")
5 more
target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo")target_from_remote("https://gitlab.example/x/y.git")url = issue_url(("ado", "org/proj"), "REQ-1", "Title", "Body")parts = urlsplit(url)query = parse_qs(parts.query)
Then
- ✓ target_from_remote("git@github.com:acme/demo.git") equals ("github", "acme/demo")
- ✓ target_from_remote("https://github.com/acme/demo") equals ("github", "acme/demo")
- ✓ target_from_remote("https://dev.azure.com/org/proj/_git/repo") equals ("ado", "org/proj")
- ✓ target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo") equals ("ado", "org/proj")
- ✓ target_from_remote("https://gitlab.example/x/y.git") is None
- ✓ parts.netloc equals "dev.azure.com"
- ✓ parts.path equals "/org/proj/_workitems/create/Issue"
- ✓ query["[System.Tags]"] equals ["req:REQ-1"]
- ✓ query["[System.Title]"][0] contains "REQ-1"
tests/test_wiki_site.py:769 · its file's page
What it checks (7)
assert target_from_remote("git@github.com:acme/demo.git") == ("github", "acme/demo")observestarget_from_remoteassert target_from_remote("https://github.com/acme/demo") == ("github", "acme/demo")observestarget_from_remoteassert target_from_remote("https://dev.azure.com/org/proj/_git/repo") == ("ado", "org/proj")observestarget_from_remoteassert target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo") == ("ado", "org/proj")observestarget_from_remoteassert target_from_remote("https://gitlab.example/x/y.git") is Noneobservestarget_from_remoteassert parts.netloc == "dev.azure.com" and parts.path == "/org/proj/_workitems/create/Issue"not attributedassert query["[System.Tags]"] == ["req:REQ-1"] and "REQ-1" in query["[System.Title]"][0]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
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.
Requirements it verifies (14)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | unknown |
| REQ-DDB-WIKI-012 | catalog | unknown |
| REQ-DDB-WIKI-013 | catalog | unknown |
| REQ-DDB-WIKI-014 | catalog | unknown |
| REQ-DDB-WIKI-015 | catalog | unknown |
| REQ-DDB-WIKI-018 | catalog | unknown |
| REQ-DDB-WIKI-020 | catalog | unknown |
| REQ-DDB-WIKI-021 | catalog | unknown |
| REQ-DDB-WIKI-023 | catalog | unknown |
| REQ-DDB-WIKI-025 | catalog | unknown |
| REQ-DDB-WIKI-031 | catalog | unknown |
| REQ-DDB-WIKI-044 | catalog | unknown |
| REQ-DDB-WIKI-050 | catalog | unknown |
| REQ-DDB-WIKI-052 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-022 measured