本文整理汇总了Python中SoftLayer.CLI.no_going_back方法的典型用法代码示例。如果您正苦于以下问题:Python CLI.no_going_back方法的具体用法?Python CLI.no_going_back怎么用?Python CLI.no_going_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoftLayer.CLI
的用法示例。
在下文中一共展示了CLI.no_going_back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_do_or_die
# 需要导入模块: from SoftLayer import CLI [as 别名]
# 或者: from SoftLayer.CLI import no_going_back [as 别名]
def test_do_or_die(self, raw_input_mock):
confirmed = '37347373737'
raw_input_mock.return_value = confirmed
result = cli.no_going_back(confirmed)
self.assertTrue(result)
confirmed = None
raw_input_mock.return_value = ''
result = cli.no_going_back(confirmed)
self.assertFalse(result)
示例2: test_do_or_die
# 需要导入模块: from SoftLayer import CLI [as 别名]
# 或者: from SoftLayer.CLI import no_going_back [as 别名]
def test_do_or_die(self, raw_input_mock):
confirmed = '37347373737'
raw_input_mock.return_value = confirmed
result = cli.no_going_back(confirmed)
self.assertTrue(result)
# no_going_back should cast int's to str()
confirmed = '4712309182309'
raw_input_mock.return_value = confirmed
result = cli.no_going_back(int(confirmed))
self.assertTrue(result)
confirmed = None
raw_input_mock.return_value = ''
result = cli.no_going_back(confirmed)
self.assertFalse(result)