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

Method testCreateDependabotSecret

tests/Organization.py:663–668  ·  view source on GitHub ↗
(self, encrypt)

Source from the content-addressed store, hash-verified

661
662 @mock.patch("github.PublicKey.encrypt")
663 def testCreateDependabotSecret(self, encrypt):
664 org = self.g.get_organization("demoorg")
665 # encrypt returns a non-deterministic value, we need to mock it so the replay data matches
666 encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b"
667 secret = org.create_secret("secret_name", "secret-value", secret_type="dependabot", visibility="all")
668 self.assertIsNotNone(secret)
669
670 def testOrgGetSecretAssertion(self):
671 org = self.g.get_organization("demoorg")

Callers

nothing calls this directly

Calls 2

get_organizationMethod · 0.80
create_secretMethod · 0.45

Tested by

no test coverage detected