~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests.py

  • Committer: Michael Ellerman
  • Date: 2006-02-08 01:24:05 UTC
  • mto: (0.1.73 shelf-tmp)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20060208012405-6afb0a532526594d
Make tests work with new bzr API, we can't use _transport anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
3
import bzrlib.tests
 
4
import os.path
4
5
 
5
6
class ShelfTests(bzrlib.tests.TestCaseInTempDir):
6
7
    ORIGINAL = '\n\nhello test world\n\n'
59
60
            self.assertEqual(file('test_file').read(), self.ORIGINAL)
60
61
 
61
62
            # Check the shelf is right
62
 
            shelf = b._transport.get('.shelf/default/00').read()
 
63
            shelf = open(os.path.join(b.base, '.shelf/default/00')).read()
63
64
            self.assertEqual(shelf, self.DIFF_1)
64
65
 
65
66
            # Unshelve
85
86
        # Shelve the changes
86
87
        self.run_bzr('shelve', retcode=3)
87
88
 
88
 
        if b._transport.has('.shelf/default/00'):
 
89
        if os.path.exists(os.path.join(b.base, '.shelf/default/00')):
89
90
            self.fail("Shelf exists, but it shouldn't")
90
91
 
91
92
    def test_shelf_with_revision(self):