~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

Merge bzr.dev

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',