当前位置: 首页>>代码示例>>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;未经允许,请勿转载。