當前位置: 首頁>>代碼示例>>Python>>正文


Python SecretManager.get方法代碼示例

本文整理匯總了Python中buildbot.secrets.manager.SecretManager.get方法的典型用法代碼示例。如果您正苦於以下問題:Python SecretManager.get方法的具體用法?Python SecretManager.get怎麽用?Python SecretManager.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在buildbot.secrets.manager.SecretManager的用法示例。


在下文中一共展示了SecretManager.get方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: testGetNoDataManagerService

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
 def testGetNoDataManagerService(self):
     secret_service_manager = SecretManager()
     fakeStorageService = FakeSecretStorage()
     fakeStorageService.reconfigService(secretdict={"foo": "bar",
                                                    "other": "value"})
     secret_service_manager.services = [fakeStorageService]
     secret_result = yield secret_service_manager.get("foo2")
     self.assertEqual(secret_result, None)
開發者ID:buildbot,項目名稱:buildbot,代碼行數:10,代碼來源:test_fake_secrets_manager.py

示例2: testGetDataMultipleManagerServiceNoDatas

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
 def testGetDataMultipleManagerServiceNoDatas(self):
     secret_service_manager = SecretManager()
     self.master.config.secretsProviders = [FakeSecretStorage({"foo": "bar",
                                                              "other": "value"}),
                                            FakeSecretStorage({"foo2": "bar",
                                                              "other2": "value"})
                                            ]
     SecretManager.master = self.master
     secret_result = yield secret_service_manager.get("foo3")
     self.assertEqual(secret_result, None)
開發者ID:zgwmike,項目名稱:buildbot,代碼行數:12,代碼來源:test_fake_secrets_manager.py

示例3: testGetDataMultipleManagerValues

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
 def testGetDataMultipleManagerValues(self):
     secret_service_manager = SecretManager()
     self.master.config.secretsProviders = [FakeSecretStorage({"foo": "bar",
                                                              "other": ""}),
                                            OtherFakeSecretStorage({"foo2": "bar2", "other": ""})
                                            ]
     SecretManager.master = self.master
     expectedSecretDetail = SecretDetails(FakeSecretStorage.__name__,
                                          "other",
                                          "")
     secret_result = yield secret_service_manager.get("other")
     self.assertEqual(secret_result, expectedSecretDetail)
開發者ID:zgwmike,項目名稱:buildbot,代碼行數:14,代碼來源:test_fake_secrets_manager.py

示例4: testGetManagerService

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
 def testGetManagerService(self):
     secret_service_manager = SecretManager()
     SecretManager.master = self.master
     expectedClassName = FakeSecretStorage.__name__
     expectedSecretDetail = SecretDetails(expectedClassName, "foo", "bar")
     secret_result = yield secret_service_manager.get("foo")
     strExpectedSecretDetail = str(secret_result)
     self.assertEqual(secret_result, expectedSecretDetail)
     self.assertEqual(secret_result.key, "foo")
     self.assertEqual(secret_result.value, "bar")
     self.assertEqual(secret_result.source, expectedClassName)
     self.assertEqual(strExpectedSecretDetail,
                      "FakeSecretStorage foo: 'bar'")
開發者ID:zgwmike,項目名稱:buildbot,代碼行數:15,代碼來源:test_fake_secrets_manager.py

示例5: testGetDataMultipleManagerValues

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
    def testGetDataMultipleManagerValues(self):
        secret_service_manager = SecretManager()
        fakeStorageService = FakeSecretStorage()
        fakeStorageService.reconfigService(secretdict={"foo": "bar",
                                                              "other": ""})
        otherFakeStorageService = FakeSecretStorage()
        otherFakeStorageService.reconfigService(secretdict={"foo2": "bar2",
                                                            "other": ""})

        secret_service_manager.services = [fakeStorageService, otherFakeStorageService]
        expectedSecretDetail = SecretDetails(FakeSecretStorage.__name__,
                                             "other",
                                             "")
        secret_result = yield secret_service_manager.get("other")
        self.assertEqual(secret_result, expectedSecretDetail)
開發者ID:buildbot,項目名稱:buildbot,代碼行數:17,代碼來源:test_fake_secrets_manager.py

示例6: testGetManagerService

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
 def testGetManagerService(self):
     secret_service_manager = SecretManager()
     fakeStorageService = FakeSecretStorage()
     fakeStorageService.reconfigService(secretdict={"foo": "bar",
                                                    "other": "value"})
     secret_service_manager.services = [fakeStorageService]
     expectedClassName = FakeSecretStorage.__name__
     expectedSecretDetail = SecretDetails(expectedClassName, "foo", "bar")
     secret_result = yield secret_service_manager.get("foo")
     strExpectedSecretDetail = str(secret_result)
     self.assertEqual(secret_result, expectedSecretDetail)
     self.assertEqual(secret_result.key, "foo")
     self.assertEqual(secret_result.value, "bar")
     self.assertEqual(secret_result.source, expectedClassName)
     self.assertEqual(strExpectedSecretDetail,
                      "FakeSecretStorage foo: 'bar'")
開發者ID:buildbot,項目名稱:buildbot,代碼行數:18,代碼來源:test_fake_secrets_manager.py

示例7: testGetNoDataManagerService

# 需要導入模塊: from buildbot.secrets.manager import SecretManager [as 別名]
# 或者: from buildbot.secrets.manager.SecretManager import get [as 別名]
 def testGetNoDataManagerService(self):
     secret_service_manager = SecretManager()
     SecretManager.master = self.master
     secret_result = yield secret_service_manager.get("foo2")
     self.assertEqual(secret_result, None)
開發者ID:zgwmike,項目名稱:buildbot,代碼行數:7,代碼來源:test_fake_secrets_manager.py


注:本文中的buildbot.secrets.manager.SecretManager.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。