tests.sphinx.test_sphinx_linkcheck moduleΒΆ

Tests for the github.com authentication of the linkcheck builder.

tests.sphinx.test_sphinx_linkcheck.ORCHARD_AUTH = ('https://orchard\\.example\\.com/', ('gardener', 'spade'))ΒΆ

A linkcheck_auth entry a project declares in its own conf.py.

tests.sphinx.test_sphinx_linkcheck.linkcheck_auth(tmp_path, entries)[source]ΒΆ

Start a linkcheck build of a project declaring entries.

Return type:

list[Any]

Returns:

the linkcheck_auth the builder reads.

tests.sphinx.test_sphinx_linkcheck.test_auth_entry_follows_the_project_ones(tmp_path, monkeypatch)[source]ΒΆ

With a token, the github.com entry comes after the entries of conf.py.

Sphinx signs a request with the first entry matching its URL, so a project entry keeps precedence.

Return type:

None

tests.sphinx.test_sphinx_linkcheck.test_no_auth_entry_without_a_token(tmp_path, monkeypatch, token)[source]ΒΆ

Without a token, linkcheck_auth holds the entries of conf.py alone.

Return type:

None

tests.sphinx.test_sphinx_linkcheck.test_bearer_auth_signs_with_the_token(monkeypatch)[source]ΒΆ

The request carries the token the environment holds when it goes out.

Return type:

None

tests.sphinx.test_sphinx_linkcheck.test_github_url_pattern(url, signed)[source]ΒΆ

The token signs every page of github.com but a release download.

Return type:

None