本文整理汇总了Python中Atomic.trust.Trust.delete方法的典型用法代码示例。如果您正苦于以下问题:Python Trust.delete方法的具体用法?Python Trust.delete怎么用?Python Trust.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Atomic.trust.Trust
的用法示例。
在下文中一共展示了Trust.delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TrustDelete
# 需要导入模块: from Atomic.trust import Trust [as 别名]
# 或者: from Atomic.trust.Trust import delete [as 别名]
def TrustDelete(self, registry, sigstoretype):
trust = Trust()
args = self.Args()
args.sigstoretype = sigstoretype
args.registry = registry
trust.set_args(args)
trust.delete()
示例2: test_delete_trust
# 需要导入模块: from Atomic.trust import Trust [as 别名]
# 或者: from Atomic.trust.Trust import delete [as 别名]
def test_delete_trust(self):
args = self.Args()
args.pubkeys = []
args.sigstoretype = "web"
args.registry = "registry.example.com/foo"
args.pubkeys = None
testobj = Trust(policy_filename=TEST_POLICY)
testobj.atomic_config = util.get_atomic_config(atomic_config=os.path.join(FIXTURE_DIR, "atomic.conf"))
testobj.set_args(args)
testobj.delete()
with open(testobj.policy_filename, "r") as f:
d = json.load(f)
self.assertNotIn(args.registry, d["transports"]["docker"])