~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_serve.py

  • Committer: Aaron Bentley
  • Date: 2007-07-17 13:27:14 UTC
  • mfrom: (2624 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070717132714-tmzx9khmg9501k51
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib import (
27
27
    errors,
28
28
    osutils,
 
29
    revision as _mod_revision,
29
30
    )
30
31
from bzrlib.branch import Branch
31
32
from bzrlib.bzrdir import BzrDir
44
45
        process.stdin.close()
45
46
        # Hide stdin from the subprocess module, so it won't fail to close it.
46
47
        process.stdin = None
47
 
        result = self.finish_bzr_subprocess(process, retcode=0)
 
48
        result = self.finish_bzr_subprocess(process)
48
49
        self.assertEqual('', result[0])
49
50
        self.assertEqual('', result[1])
50
51
    
107
108
        # We get a working branch
108
109
        branch = BzrDir.open_from_transport(transport).open_branch()
109
110
        branch.repository.get_revision_graph()
110
 
        self.assertEqual(None, branch.last_revision())
 
111
        self.assertEqual(_mod_revision.NULL_REVISION,
 
112
                         _mod_revision.ensure_null(branch.last_revision()))
111
113
        self.assertInetServerShutsdownCleanly(process)
112
114
 
113
115
    def test_bzr_serve_port_readonly(self):
128
130
 
129
131
        # We get a working branch
130
132
        branch.repository.get_revision_graph()
131
 
        self.assertEqual(None, branch.last_revision())
 
133
        self.assertEqual(_mod_revision.NULL_REVISION,
 
134
                         _mod_revision.ensure_null(branch.last_revision()))
132
135
 
133
136
        self.assertServerFinishesCleanly(process)
134
137
 
207
210
                'bzr+ssh://fred:secret@localhost:%d%s' % (port, path_to_branch))
208
211
            
209
212
            branch.repository.get_revision_graph()
210
 
            self.assertEqual(None, branch.last_revision())
 
213
            self.assertEqual(_mod_revision.NULL_REVISION,
 
214
                             _mod_revision.ensure_null(branch.last_revision()))
211
215
            # Check we can perform write operations
212
216
            branch.bzrdir.root_transport.mkdir('foo')
213
217
        finally: