MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testCreateRepoDependabotSecret

Method testCreateRepoDependabotSecret

tests/Repository.py:2316–2321  ·  view source on GitHub ↗
(self, encrypt)

Source from the content-addressed store, hash-verified

2314
2315 @mock.patch("github.PublicKey.encrypt")
2316 def testCreateRepoDependabotSecret(self, encrypt):
2317 repo = self.g.get_repo("demoorg/demo-repo-1")
2318 # encrypt returns a non-deterministic value, we need to mock it so the replay data matches
2319 encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"
2320 secret = repo.create_secret("secret_name", "secret-value", "dependabot")
2321 self.assertIsNotNone(secret)
2322
2323 def testRepoGetSecretAssertion(self):
2324 repo = self.g.get_repo("demoorg/demo-repo-1")

Callers

nothing calls this directly

Calls 2

get_repoMethod · 0.45
create_secretMethod · 0.45

Tested by

no test coverage detected