本文整理汇总了Python中webkitpy.thirdparty.mock.Mock.all方法的典型用法代码示例。如果您正苦于以下问题:Python Mock.all方法的具体用法?Python Mock.all怎么用?Python Mock.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.thirdparty.mock.Mock
的用法示例。
在下文中一共展示了Mock.all方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_patches_to_review
# 需要导入模块: from webkitpy.thirdparty.mock import Mock [as 别名]
# 或者: from webkitpy.thirdparty.mock.Mock import all [as 别名]
def test_patches_to_review(self):
options = Mock()
# When no cc_email is provided, we use the Bugzilla username by default.
# The MockBugzilla will fake the authentication using [email protected]
# as login and it should match the username at the report header.
options.cc_email = None
options.include_cq_denied = False
options.all = False
expected_stdout = (
"Bugs with attachments pending review that has [email protected] in the CC list:\n"
"http://webkit.org/b/bugid Description (age in days)\n"
"Total: 0\n"
)
expected_stderr = ""
self.assert_execute_outputs(PatchesToReview(), None, expected_stdout, expected_stderr, options=options)
options.cc_email = "[email protected]"
options.include_cq_denied = True
options.all = False
expected_stdout = (
"Bugs with attachments pending review that has [email protected] in the CC list:\n"
"http://webkit.org/b/bugid Description (age in days)\n"
"http://webkit.org/b/50001 Bug with a patch needing review. (0)\n"
"Total: 1\n"
)
expected_stderr = ""
self.assert_execute_outputs(PatchesToReview(), None, expected_stdout, expected_stderr, options=options)
options.cc_email = None
options.include_cq_denied = True
options.all = True
expected_stdout = (
"Bugs with attachments pending review:\n"
"http://webkit.org/b/bugid Description (age in days)\n"
"http://webkit.org/b/50001 Bug with a patch needing review. (0)\n"
"Total: 1\n"
)
self.assert_execute_outputs(PatchesToReview(), None, expected_stdout, expected_stderr, options=options)
options.cc_email = None
options.include_cq_denied = False
options.all = True
expected_stdout = (
"Bugs with attachments pending review:\n"
"http://webkit.org/b/bugid Description (age in days)\n"
"Total: 0\n"
)
self.assert_execute_outputs(PatchesToReview(), None, expected_stdout, expected_stderr, options=options)
options.cc_email = "[email protected]"
options.all = False
options.include_cq_denied = True
expected_stdout = (
"Bugs with attachments pending review that has [email protected] in the CC list:\n"
"http://webkit.org/b/bugid Description (age in days)\n"
"Total: 0\n"
)
self.assert_execute_outputs(PatchesToReview(), None, expected_stdout, expected_stderr, options=options)