~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Martin Pool
  • Date: 2009-03-24 05:21:02 UTC
  • mfrom: (4192 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4202.
  • Revision ID: mbp@sourcefrog.net-20090324052102-8kk087b32tep3d9h
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# TODO: Testaments with x-bits
20
20
 
21
21
import os
22
 
from sha import sha
23
22
 
 
23
from bzrlib import osutils
24
24
from bzrlib.tests import SymlinkFeature, TestCaseWithTransport
25
25
from bzrlib.testament import Testament, StrictTestament, StrictTestament3
26
26
from bzrlib.transform import TreeTransform
141
141
        inventory = self.b.repository.get_inventory('test@user-2')
142
142
        testament_1 = self.testament_class()(revision, inventory)
143
143
        text_1 = testament_1.as_short_text()
144
 
        text_2 = self.from_revision(self.b.repository, 
 
144
        text_2 = self.from_revision(self.b.repository,
145
145
                                    'test@user-2').as_short_text()
146
146
        self.assertEqual(text_1, text_2)
147
 
                    
 
147
 
148
148
 
149
149
class TestamentTestsStrict(TestamentTests):
150
 
    
 
150
 
151
151
    def testament_class(self):
152
152
        return StrictTestament
153
153
 
154
154
 
155
155
class TestamentTestsStrict2(TestamentTests):
156
 
    
 
156
 
157
157
    def testament_class(self):
158
158
        return StrictTestament3
159
159
 
211
211
bazaar-ng testament short form 1
212
212
revision-id: test@user-1
213
213
sha1: %s
214
 
""" % sha(REV_1_TESTAMENT).hexdigest()
 
214
""" % osutils.sha(REV_1_TESTAMENT).hexdigest()
215
215
 
216
216
 
217
217
REV_1_SHORT_STRICT = """\
218
218
bazaar-ng testament short form 2.1
219
219
revision-id: test@user-1
220
220
sha1: %s
221
 
""" % sha(REV_1_STRICT_TESTAMENT).hexdigest()
 
221
""" % osutils.sha(REV_1_STRICT_TESTAMENT).hexdigest()
222
222
 
223
223
 
224
224
REV_1_SHORT_STRICT3 = """\
225
225
bazaar testament short form 3 strict
226
226
revision-id: test@user-1
227
227
sha1: %s
228
 
""" % sha(REV_1_STRICT_TESTAMENT3).hexdigest()
 
228
""" % osutils.sha(REV_1_STRICT_TESTAMENT3).hexdigest()
229
229
 
230
230
 
231
231
REV_2_TESTAMENT = """\
293
293
bazaar-ng testament short form 1
294
294
revision-id: test@user-2
295
295
sha1: %s
296
 
""" % sha(REV_2_TESTAMENT).hexdigest()
 
296
""" % osutils.sha(REV_2_TESTAMENT).hexdigest()
297
297
 
298
298
 
299
299
REV_2_SHORT_STRICT = """\
300
300
bazaar-ng testament short form 2.1
301
301
revision-id: test@user-2
302
302
sha1: %s
303
 
""" % sha(REV_2_STRICT_TESTAMENT).hexdigest()
 
303
""" % osutils.sha(REV_2_STRICT_TESTAMENT).hexdigest()
304
304
 
305
305
 
306
306
REV_2_SHORT_STRICT3 = """\
307
307
bazaar testament short form 3 strict
308
308
revision-id: test@user-2
309
309
sha1: %s
310
 
""" % sha(REV_2_STRICT_TESTAMENT3).hexdigest()
 
310
""" % osutils.sha(REV_2_STRICT_TESTAMENT3).hexdigest()
311
311
 
312
312
 
313
313
REV_PROPS_TESTAMENT = """\