~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Andrew Bennetts
  • Date: 2007-08-30 08:11:54 UTC
  • mfrom: (2766 +trunk)
  • mto: (2535.3.55 repo-refactor)
  • mto: This revision was merged to the branch mainline in revision 2772.
  • Revision ID: andrew.bennetts@canonical.com-20070830081154-16hebp2xwr15x2hc
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
695
695
        self.assertEqual(['bar', 'baz'], err.files)
696
696
        self.assertEqual('Selected-file commit of merges is not supported'
697
697
                         ' yet: files bar, baz', str(err))
 
698
 
 
699
    def test_commit_no_author(self):
 
700
        """The default kwarg author in MutableTree.commit should not add
 
701
        the 'author' revision property.
 
702
        """
 
703
        tree = self.make_branch_and_tree('foo')
 
704
        rev_id = tree.commit('commit 1')
 
705
        rev = tree.branch.repository.get_revision(rev_id)
 
706
        self.assertFalse('author' in rev.properties)
 
707
 
 
708
    def test_commit_author(self):
 
709
        """Passing a non-empty author kwarg to MutableTree.commit should add
 
710
        the 'author' revision property.
 
711
        """
 
712
        tree = self.make_branch_and_tree('foo')
 
713
        rev_id = tree.commit('commit 1', author='John Doe <jdoe@example.com>')
 
714
        rev = tree.branch.repository.get_revision(rev_id)
 
715
        self.assertEqual('John Doe <jdoe@example.com>',
 
716
                         rev.properties['author'])