def test_matcher_set(self): args = ('--issue-matcher', 'test', 'r', 's', 'e') result = commit_report.parse_args(args=args) self.assertEqual(result.issue_id_regex, 'test')
def test_template_set(self): args = ('--link-template', 'test', 'r', 's', 'e') result = commit_report.parse_args(args=args) self.assertEqual(result.link_template, 'test')
def test_matcher_default(self): args = ('r', 's', 'e') result = commit_report.parse_args(args=args) self.assertEqual(result.issue_id_regex, commit_report.DEFAULT_ISSUE_ID_MATCHER)
def test_end(self): args = ('r', 's', 'e') result = commit_report.parse_args(args=args) self.assertEqual(result.end, 'e')
def test_template_default(self): args = ('r', 's', 'e') result = commit_report.parse_args(args=args) self.assertEqual(result.link_template, commit_report.DEFAULT_LINK_TEMPLATE)
def test_start(self): args = ('r', 's', 'e') result = commit_report.parse_args(args=args) self.assertEqual(result.start, 's')
def test_issue_links_selected(self): args = ('--issue-links', '1', '2', '3') result = commit_report.parse_args(args=args) self.assertEqual(result.links, True)
def test_issue_links_unselected(self): args = ('1', '2', '3') result = commit_report.parse_args(args=args) self.assertEqual(result.links, False)
def test_json(self): args = ('--json', '1', '2', '3') result = commit_report.parse_args(args=args) self.assertEqual(result.formatter, commit_report.format_for_json)
def test_human_selected(self): args = ('--human', '1', '2', '3') result = commit_report.parse_args(args=args) self.assertEqual(result.formatter, commit_report.format_for_humans)