~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testtestament.py

[merge] from robert and fix up tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib.trace import mutter
30
30
from bzrlib.osutils import has_symlinks
31
31
 
 
32
 
32
33
class TestamentTests(TestCaseInTempDir):
 
34
 
33
35
    def setUp(self):
34
36
        super(TestamentTests, self).setUp()
35
37
        b = self.b = Branch.initialize('.')
114
116
                      revprops=props)
115
117
        t = Testament.from_revision(self.b, 'test@user-3')
116
118
        self.assertEqualDiff(t.as_text(), REV_PROPS_TESTAMENT)
 
119
 
 
120
    def test___init__(self):
 
121
        revision = self.b.get_revision('test@user-2')
 
122
        inventory = self.b.get_inventory('test@user-2')
 
123
        testament_1 = Testament(revision, inventory).as_short_text()
 
124
        testament_2 = Testament.from_revision(self.b, 
 
125
                                              'test@user-2').as_short_text()
 
126
        self.assertEqual(testament_1, testament_2)
117
127
                    
118
128
 
119
129
REV_1_TESTAMENT = """\