~ubuntu-branches/ubuntu/lucid/bzr/lucid-proposed

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_basis_inventory.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeff Bailey
  • Date: 2006-03-20 08:31:00 UTC
  • mfrom: (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060320083100-ovdi2ssuw0epcx8s
Tags: 0.8~200603200831-0ubuntu1
* Snapshot uploaded to Dapper at Martin Pool's request.

* Disable testsuite for upload.  Fakeroot and the testsuite don't
  play along.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import os
18
18
 
19
 
from bzrlib.tests import TestCaseInTempDir
 
19
from bzrlib.tests import TestCaseWithTransport
20
20
from bzrlib.branch import Branch
21
21
from bzrlib.xml5 import serializer_v5
22
22
 
23
23
 
24
 
class TestBasisInventory(TestCaseInTempDir):
 
24
class TestBasisInventory(TestCaseWithTransport):
25
25
 
26
26
    def test_create(self):
27
27
        # Make sure the basis file is created by a commit
28
 
        b = Branch.initialize(u'.')
29
 
        t = b.working_tree()
 
28
        t = self.make_branch_and_tree('.')
 
29
        b = t.branch
30
30
        open('a', 'wb').write('a\n')
31
31
        t.add('a')
32
32
        t.commit('a', rev_id='r1')
37
37
        basis_inv = serializer_v5.read_inventory_from_string(basis_inv_txt)
38
38
        #self.assertEquals('r1', basis_inv.revision_id)
39
39
        
40
 
        store_inv = b.get_inventory('r1')
 
40
        store_inv = b.repository.get_inventory('r1')
41
41
        self.assertEquals(store_inv._byid, basis_inv._byid)
42
42
 
43
43
        open('b', 'wb').write('b\n')
49
49
 
50
50
        basis_inv_txt = t.read_basis_inventory('r2')
51
51
        basis_inv = serializer_v5.read_inventory_from_string(basis_inv_txt)
52
 
        store_inv = b.get_inventory('r2')
 
52
        store_inv = b.repository.get_inventory('r2')
53
53
 
54
54
        self.assertEquals(store_inv._byid, basis_inv._byid)
55
55