def test_branch_description(): ui = mock_ui() repo = get_repo(ui, 'branch') opts = get_initial_opts() opts['branch'] = True c = repo[4] parentc = repo[0] fields = createfields(ui, repo, c, parentc, opts) expected = ('review of branch: the_branch\n\n' 'changesets:\n' '\t4:173fa0623445 "4"\n' '\t3:0c15fa2e6ba5 "3"\n') eq_(expected, fields['description'])
def setup(self): ui, repo, c, parentc, opts = set_up_two_revs() self.fields = createfields(ui, repo, c, parentc, opts)
def test_target_people(): ui, repo, c, parentc, opts = set_up_two_revs() opts['target_people'] = 'john, jane' fields = createfields(ui, repo, c, parentc, opts) eq_('john, jane', fields['target_people'])
def test_target_groups(): ui, repo, c, parentc, opts = set_up_two_revs() opts['target_groups'] = 'foo, bar' fields = createfields(ui, repo, c, parentc, opts) eq_('foo, bar', fields['target_groups'])
def get_fields(self): return createfields(self.ui, self.repo, self.c, self.parentc, self.opts)