本文整理汇总了Python中drupdates.tests.behavioral.behavioral_utils.BehavioralUtils类的典型用法代码示例。如果您正苦于以下问题:Python BehavioralUtils类的具体用法?Python BehavioralUtils怎么用?Python BehavioralUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BehavioralUtils类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_class
def setup_class(cls):
""" Setup test class. """
utils = BehavioralUtils()
settings = utils.build(__file__)
utils.run(settings)
示例2: setup
def setup(self, file_name):
""" Setup the demo files. """
utils = BehavioralUtils()
utils.build(file_name)
示例3: test_repo_built
def test_repo_built():
""" Test to ensure one repo built successfully. """
count = BehavioralUtils.count_repos_updated('builds')
# If 1 repo Siteupdates in report repo built successfully.
assert count == 1
示例4: test_repo_updated
def test_repo_updated():
""" Test to ensure the repo was updated. """
status = "The following updates were applied"
report_status = BehavioralUtils.check_repo_updated('drupal', 'builds')
assert report_status == status
示例5: test_second_repo_built
def test_second_repo_built(self):
""" Test to ensure both repos built successfully. """
count = BehavioralUtils.count_repos_updated('builds/test')
# If 1 repo Siteupdates in report repo built successfully in builds/test.
assert count == 1
示例6: test_repo_commit_count
def test_repo_commit_count():
""" Test that the repo has 4 commits. """
commit_count = BehavioralUtils.count_commits('drupal', 'builds')
assert commit_count == 4
示例7: test_all_repos_built
def test_all_repos_built():
""" Test to ensure all three repos built successfully. """
count = BehavioralUtils.count_repos_updated('builds')
# If 3 repos Siteupdates in report repo built successfully.
assert count == 3
示例8: test_third_repo_updated
def test_third_repo_updated():
""" Test to ensure the third repo didn't need updated. """
status = "Did not have any updates to apply"
report_status = BehavioralUtils.check_repo_updated('drupal3', 'builds')
assert report_status == status
示例9: setup_class
def setup_class(cls):
""" Setup test class. """
utils = BehavioralUtils()
utils.build(__file__)
示例10: test_second_repo_updated
def test_second_repo_updated():
""" Test to ensure the second repo was updated. """
status = "The following updates were applied"
report_status = BehavioralUtils.check_repo_updated('dmake', 'builds/test')
assert report_status == status
示例11: test_git_drupdates_branch
def test_git_drupdates_branch():
""" Test to verify the name of the git commit is 'Security Updates'. """
commit = BehavioralUtils.get_drupdates_commit('drupal', 'builds')
assert commit.author.name == 'Security Updates'
示例12: test_git_commit_author
def test_git_commit_author():
""" Test to verify the name of the git commit is "Drupdates". """
devcommit = BehavioralUtils.get_dev_commit('drupal', 'builds')
assert devcommit.author.name == 'Drupdates'
示例13: test_count_total_sites_updated
def test_count_total_sites_updated():
""" Count to ensure 2 sites has updates installed. """
count = BehavioralUtils.count_sites_updated('drupal', 'builds')
assert count == 2