~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Martin Pool
  • Date: 2006-02-01 12:24:35 UTC
  • mfrom: (1534.4.32 branch-formats)
  • mto: This revision was merged to the branch mainline in revision 1553.
  • Revision ID: mbp@sourcefrog.net-20060201122435-53f3efb1b5749fe1
[merge] branch-formats branch, and reconcile changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from sha import sha
23
23
import sys
24
24
 
25
 
from bzrlib.tests import TestCaseInTempDir
 
25
from bzrlib.tests import TestCaseWithTransport
26
26
from bzrlib.branch import Branch
27
27
from bzrlib.testament import Testament
28
28
from bzrlib.trace import mutter
29
29
from bzrlib.osutils import has_symlinks
30
30
 
31
31
 
32
 
class TestamentTests(TestCaseInTempDir):
 
32
class TestamentTests(TestCaseWithTransport):
33
33
 
34
34
    def setUp(self):
35
35
        super(TestamentTests, self).setUp()
36
 
        b = self.b = Branch.initialize(u'.')
 
36
        wt = self.make_branch_and_tree('.')
 
37
        b = self.b = wt.branch
37
38
        b.nick = "test branch"
38
 
        b.working_tree().commit(message='initial null commit',
 
39
        wt.commit(message='initial null commit',
39
40
                 committer='test@user',
40
41
                 timestamp=1129025423, # 'Tue Oct 11 20:10:23 2005'
41
42
                 timezone=0,
43
44
        self.build_tree_contents([('hello', 'contents of hello file'),
44
45
                             ('src/', ),
45
46
                             ('src/foo.c', 'int main()\n{\n}\n')])
46
 
        b.working_tree().add(['hello', 'src', 'src/foo.c'],
 
47
        wt.add(['hello', 'src', 'src/foo.c'],
47
48
                             ['hello-id', 'src-id', 'foo.c-id'])
48
 
        b.working_tree().commit(message='add files and directories',
 
49
        wt.commit(message='add files and directories',
49
50
                 timestamp=1129025483,
50
51
                 timezone=36000,
51
52
                 rev_id='test@user-2',