def test_recent_commit_messages(self): tool = MockTool() suggest_nominations = SuggestNominations() suggest_nominations._init_options(options=self._make_options()) suggest_nominations.bind_to_tool(tool) tool.executive.run_command = lambda command: self.mock_git_output self.assertEqual(list(suggest_nominations._recent_commit_messages()), [self.mock_same_author_commit_message])
def test_recent_commit_messages(self): tool = MockTool() suggest_nominations = SuggestNominations() suggest_nominations._init_options( options=MockOptions( reviewer_minimum=80, committer_minimum=10, max_commit_age=9, show_commits=False, verbose=False ) ) suggest_nominations.bind_to_tool(tool) tool.executive.run_command = lambda command: self.mock_git_output self.assertEqual(list(suggest_nominations._recent_commit_messages()), [self.mock_same_author_commit_message])
def test_recent_commit_messages(self): tool = MockTool() suggest_nominations = SuggestNominations() suggest_nominations._init_options( options=MockOptions(reviewer_minimum=80, committer_minimum=10, max_commit_age=9, show_commits=False, verbose=False)) suggest_nominations.bind_to_tool(tool) tool.executive.run_command = lambda command: self.mock_git_output self.assertEqual(list(suggest_nominations._recent_commit_messages()), [self.mock_same_author_commit_message])