(self, encrypt)
| 224 | |
| 225 | @mock.patch("github.PublicKey.encrypt") |
| 226 | def testEnvironmentSecret(self, encrypt): |
| 227 | # encrypt returns a non-deterministic value, we need to mock it so the replay data matches |
| 228 | encrypt.return_value = "M+5Fm/BqTfB90h3nC7F3BoZuu3nXs+/KtpXwxm9gG211tbRo0F5UiN0OIfYT83CKcx9oKES9Va4E96/b" |
| 229 | repo = self.g.get_repo("AndrewJDawes/PyGithub") |
| 230 | environment = repo.create_environment("test") |
| 231 | secret = environment.create_secret("secret_name", "secret-value") |
| 232 | secret.update() |
| 233 | # GitHub will always capitalize the secret name |
| 234 | self.assertEqual(secret.name, "SECRET_NAME") |
| 235 | secret.delete() |
| 236 | repo.delete_environment("test") |
| 237 | |
| 238 | @mock.patch("github.PublicKey.encrypt") |
| 239 | def testEnvironmentSecrets(self, encrypt): |
nothing calls this directly
no test coverage detected