~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Aaron Bentley
  • Date: 2006-09-26 13:28:39 UTC
  • mto: This revision was merged to the branch mainline in revision 2048.
  • Revision ID: abentley@panoramicfeedback.com-20060926132839-cee32159ab268eeb
Changes from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2005-2006 by Canonical Ltd
1
2
#
2
3
# This program is free software; you can redistribute it and/or modify
3
4
# it under the terms of the GNU General Public License as published by
21
22
from sha import sha
22
23
 
23
24
from bzrlib.tests import TestCaseWithTransport
24
 
from bzrlib.testament import Testament, StrictTestament, StrictTestament2
 
25
from bzrlib.testament import Testament, StrictTestament, StrictTestament3
25
26
from bzrlib.transform import TreeTransform
26
27
from bzrlib.osutils import has_symlinks
27
28
 
155
156
class TestamentTestsStrict2(TestamentTests):
156
157
    
157
158
    def testament_class(self):
158
 
        return StrictTestament2
 
159
        return StrictTestament3
159
160
 
160
161
 
161
162
REV_1_TESTAMENT = """\
190
191
"""
191
192
 
192
193
 
193
 
REV_1_STRICT_TESTAMENT2 = """\
194
 
bazaar-ng testament version 3 strict
 
194
REV_1_STRICT_TESTAMENT3 = """\
 
195
bazaar testament version 3 strict
195
196
revision-id: test@user-1
196
197
committer: test@user
197
198
timestamp: 1129025423
221
222
""" % sha(REV_1_STRICT_TESTAMENT).hexdigest()
222
223
 
223
224
 
224
 
REV_1_SHORT_STRICT2 = """\
225
 
bazaar-ng testament short form 3 strict
 
225
REV_1_SHORT_STRICT3 = """\
 
226
bazaar testament short form 3 strict
226
227
revision-id: test@user-1
227
228
sha1: %s
228
 
""" % sha(REV_1_STRICT_TESTAMENT2).hexdigest()
 
229
""" % sha(REV_1_STRICT_TESTAMENT3).hexdigest()
229
230
 
230
231
 
231
232
REV_2_TESTAMENT = """\
268
269
"""
269
270
 
270
271
 
271
 
REV_2_STRICT_TESTAMENT2 = """\
272
 
bazaar-ng testament version 3 strict
 
272
REV_2_STRICT_TESTAMENT3 = """\
 
273
bazaar testament version 3 strict
273
274
revision-id: test@user-2
274
275
committer: test@user
275
276
timestamp: 1129025483
303
304
""" % sha(REV_2_STRICT_TESTAMENT).hexdigest()
304
305
 
305
306
 
306
 
REV_2_SHORT_STRICT2 = """\
307
 
bazaar-ng testament short form 3 strict
 
307
REV_2_SHORT_STRICT3 = """\
 
308
bazaar testament short form 3 strict
308
309
revision-id: test@user-2
309
310
sha1: %s
310
 
""" % sha(REV_2_STRICT_TESTAMENT2).hexdigest()
 
311
""" % sha(REV_2_STRICT_TESTAMENT3).hexdigest()
311
312
 
312
313
 
313
314
REV_PROPS_TESTAMENT = """\
362
363
"""
363
364
 
364
365
 
365
 
REV_PROPS_TESTAMENT_STRICT2 = """\
366
 
bazaar-ng testament version 3 strict
 
366
REV_PROPS_TESTAMENT_STRICT3 = """\
 
367
bazaar testament version 3 strict
367
368
revision-id: test@user-3
368
369
committer: test@user
369
370
timestamp: 1129025493
431
432
"""
432
433
 
433
434
 
434
 
REV_3_TESTAMENT_STRICT2 = """\
435
 
bazaar-ng testament version 3 strict
 
435
REV_3_TESTAMENT_STRICT3 = """\
 
436
bazaar testament version 3 strict
436
437
revision-id: test@user-3
437
438
committer: test@user
438
439
timestamp: 1129025493
497
498
"""
498
499
 
499
500
 
500
 
SAMPLE_UNICODE_TESTAMENT_STRICT2 = u"""\
501
 
bazaar-ng testament version 3 strict
 
501
SAMPLE_UNICODE_TESTAMENT_STRICT3 = u"""\
 
502
bazaar testament version 3 strict
502
503
revision-id: test@user-3
503
504
committer: Erik B\xe5gfors <test@user>
504
505
timestamp: 1129025493
537
538
                      'rev_props': REV_PROPS_TESTAMENT_STRICT,
538
539
                      'sample_unicode': SAMPLE_UNICODE_TESTAMENT_STRICT,
539
540
    },
540
 
    StrictTestament2: {'rev_1': REV_1_STRICT_TESTAMENT2,
541
 
                      'rev_1_short': REV_1_SHORT_STRICT2,
542
 
                      'rev_2': REV_2_STRICT_TESTAMENT2,
543
 
                      'rev_2_short': REV_2_SHORT_STRICT2,
544
 
                      'rev_3': REV_3_TESTAMENT_STRICT2,
545
 
                      'rev_props': REV_PROPS_TESTAMENT_STRICT2,
546
 
                      'sample_unicode': SAMPLE_UNICODE_TESTAMENT_STRICT2,
 
541
    StrictTestament3: {'rev_1': REV_1_STRICT_TESTAMENT3,
 
542
                      'rev_1_short': REV_1_SHORT_STRICT3,
 
543
                      'rev_2': REV_2_STRICT_TESTAMENT3,
 
544
                      'rev_2_short': REV_2_SHORT_STRICT3,
 
545
                      'rev_3': REV_3_TESTAMENT_STRICT3,
 
546
                      'rev_props': REV_PROPS_TESTAMENT_STRICT3,
 
547
                      'sample_unicode': SAMPLE_UNICODE_TESTAMENT_STRICT3,
547
548
    },
548
549
}