~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Aaron Bentley
  • Date: 2005-12-25 00:38:48 UTC
  • mto: (1185.67.11 bzr.revision-storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051225003848-111ac71170cb2605
Renamed Branch.storage to Branch.repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
    def test_null_testament(self):
55
55
        """Testament for a revision with no contents."""
56
 
        t = Testament.from_revision(self.b.storage, 'test@user-1')
 
56
        t = Testament.from_revision(self.b.repository, 'test@user-1')
57
57
        ass = self.assertTrue
58
58
        eq = self.assertEqual
59
59
        ass(isinstance(t, Testament))
64
64
 
65
65
    def test_testment_text_form(self):
66
66
        """Conversion of testament to canonical text form."""
67
 
        t = Testament.from_revision(self.b.storage, 'test@user-1')
 
67
        t = Testament.from_revision(self.b.repository, 'test@user-1')
68
68
        text_form = t.as_text()
69
69
        self.log('testament text form:\n' + text_form)
70
70
        self.assertEqual(text_form, REV_1_TESTAMENT)
71
71
 
72
72
    def test_testament_with_contents(self):
73
73
        """Testament containing a file and a directory."""
74
 
        t = Testament.from_revision(self.b.storage, 'test@user-2')
 
74
        t = Testament.from_revision(self.b.repository, 'test@user-2')
75
75
        text_form = t.as_text()
76
76
        self.log('testament text form:\n' + text_form)
77
77
        self.assertEqualDiff(text_form, REV_2_TESTAMENT)
101
101
                 timezone=36000,
102
102
                 rev_id='test@user-3',
103
103
                 committer='test@user')
104
 
        t = Testament.from_revision(self.b.storage, 'test@user-3')
 
104
        t = Testament.from_revision(self.b.repository, 'test@user-3')
105
105
        self.assertEqualDiff(t.as_text(), REV_3_TESTAMENT)
106
106
 
107
107
    def test_testament_revprops(self):
114
114
                      rev_id='test@user-3',
115
115
                      committer='test@user',
116
116
                      revprops=props)
117
 
        t = Testament.from_revision(self.b.storage, 'test@user-3')
 
117
        t = Testament.from_revision(self.b.repository, 'test@user-3')
118
118
        self.assertEqualDiff(t.as_text(), REV_PROPS_TESTAMENT)
119
119
 
120
120
    def test___init__(self):
121
 
        revision = self.b.storage.get_revision('test@user-2')
122
 
        inventory = self.b.storage.get_inventory('test@user-2')
 
121
        revision = self.b.repository.get_revision('test@user-2')
 
122
        inventory = self.b.repository.get_inventory('test@user-2')
123
123
        testament_1 = Testament(revision, inventory).as_short_text()
124
 
        testament_2 = Testament.from_revision(self.b.storage, 
 
124
        testament_2 = Testament.from_revision(self.b.repository, 
125
125
                                              'test@user-2').as_short_text()
126
126
        self.assertEqual(testament_1, testament_2)
127
127