MCPcopy Create free account
hub / github.com/libgit2/pygit2 / certificate_check

Method certificate_check

test/test_credentials.py:178–184  ·  view source on GitHub ↗
(
            self, certificate: None, valid: bool, host: bytes
        )

Source from the content-addressed store, hash-verified

176def test_fetch_certificate_check(testrepo: Repository) -> None:
177 class MyCallbacks(pygit2.RemoteCallbacks):
178 def certificate_check(
179 self, certificate: None, valid: bool, host: bytes
180 ) -> bool:
181 assert certificate is None
182 assert valid is True
183 assert host == b'github.com'
184 return False
185
186 url = 'https://github.com/libgit2/pygit2.git'
187 remote = testrepo.remotes.create('https', url)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected