本文整理汇总了Python中pycall.CallFile.is_valid方法的典型用法代码示例。如果您正苦于以下问题:Python CallFile.is_valid方法的具体用法?Python CallFile.is_valid怎么用?Python CallFile.is_valid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pycall.CallFile
的用法示例。
在下文中一共展示了CallFile.is_valid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_is_valid_invalid_spool_dir
# 需要导入模块: from pycall import CallFile [as 别名]
# 或者: from pycall.CallFile import is_valid [as 别名]
def test_is_valid_invalid_spool_dir(self):
"""Ensure `is_valid` fails given an invalid `spool_dir` attribute."""
c = CallFile(self.call, self.action, spool_dir='/woot')
assert_false(c.is_valid())
示例2: test_is_valid_invalid_call_is_valid
# 需要导入模块: from pycall import CallFile [as 别名]
# 或者: from pycall.CallFile import is_valid [as 别名]
def test_is_valid_invalid_call_is_valid(self):
"""Ensure `is_valid` fails when `call.is_valid()` fails."""
c = CallFile(Call('channel', wait_time='10'), self.action,
spool_dir=self.spool_dir)
assert_false(c.is_valid())
示例3: test_is_valid_invalid_action
# 需要导入模块: from pycall import CallFile [as 别名]
# 或者: from pycall.CallFile import is_valid [as 别名]
def test_is_valid_invalid_action(self):
"""Ensure `is_valid` fails given an invalid `action` attribute."""
c = CallFile(self.call, 'action', spool_dir=self.spool_dir)
assert_false(c.is_valid())
示例4: test_is_valid_invalid_call
# 需要导入模块: from pycall import CallFile [as 别名]
# 或者: from pycall.CallFile import is_valid [as 别名]
def test_is_valid_invalid_call(self):
"""Ensure `is_valid` fails given an invalid `call` attribute."""
c = CallFile('call', self.action, spool_dir=self.spool_dir)
assert_false(c.is_valid())
示例5: test_is_valid_valid_call_is_valid
# 需要导入模块: from pycall import CallFile [as 别名]
# 或者: from pycall.CallFile import is_valid [as 别名]
def test_is_valid_valid_call_is_valid(self):
"""Ensure `is_valid` works when `call.is_valid()` works."""
c = CallFile(self.call, self.action, spool_dir=self.spool_dir)
ok_(c.is_valid())
示例6: test_is_valid_valid_spool_dir
# 需要导入模块: from pycall import CallFile [as 别名]
# 或者: from pycall.CallFile import is_valid [as 别名]
def test_is_valid_valid_spool_dir(self):
"""Ensure `is_valid` works using a valid `spool_dir` attribute."""
c = CallFile(self.call, self.action, spool_dir=self.spool_dir)
ok_(c.is_valid())