~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-06 21:01:10 UTC
  • mto: This revision was merged to the branch mainline in revision 4282.
  • Revision ID: jelmer@samba.org-20090406210110-3f2ektdpbhrpl9bf
Cope with revision.committer being None.

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
                r.get_apparent_author)
228
228
        self.assertEqual('C', author)
229
229
 
 
230
    def test_get_apparent_author_none(self):
 
231
        r = revision.Revision('1')
 
232
        r.committer = None
 
233
        author = self.applyDeprecated(
 
234
                symbol_versioning.deprecated_in((1, 13, 0)),
 
235
                r.get_apparent_author)
 
236
        self.assertEqual(None, author)
 
237
 
230
238
    def test_get_apparent_authors(self):
231
239
        r = revision.Revision('1')
232
240
        r.committer = 'A'
236
244
        r.properties['authors'] = 'C\nD'
237
245
        self.assertEqual(['C', 'D'], r.get_apparent_authors())
238
246
 
 
247
    def test_get_apparent_authors_no_committer(self):
 
248
        r = revision.Revision('1')
 
249
        self.assertEqual([], r.get_apparent_authors())
 
250
 
239
251
 
240
252
class TestRevisionBugs(TestCase):
241
253
    """Tests for getting the bugs that a revision is linked to."""