/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

(jameinel) Transform.rename test shouldn't assume the str form of the
 exception because of locale issues. (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
31
31
    errors,
32
32
    osutils,
33
33
    revision as _mod_revision,
 
34
    transport,
34
35
    urlutils,
35
36
    )
36
37
from bzrlib.branch import Branch
43
44
    TestSkipped,
44
45
    )
45
46
from bzrlib.trace import mutter
46
 
from bzrlib.transport import get_transport, remote
 
47
from bzrlib.transport import remote
47
48
 
48
49
 
49
50
class TestBzrServeBase(TestCaseWithTransport):
192
193
    def test_bzr_serve_port_readonly(self):
193
194
        """bzr server should provide a read only filesystem by default."""
194
195
        process, url = self.start_server_port()
195
 
        transport = get_transport(url)
196
 
        self.assertRaises(errors.TransportNotPossible, transport.mkdir, 'adir')
 
196
        t = transport.get_transport(url)
 
197
        self.assertRaises(errors.TransportNotPossible, t.mkdir, 'adir')
197
198
        self.assertServerFinishesCleanly(process)
198
199
 
199
200
    def test_bzr_serve_port_readwrite(self):
224
225
        # -Dhpss, and does drop some hpss logging to the file.
225
226
        self.make_branch('.')
226
227
        log_fname = os.getcwd() + '/server.log'
227
 
        self._captureVar('BZR_LOG', log_fname)
 
228
        self.overrideEnv('BZR_LOG', log_fname)
228
229
        process, transport = self.start_server_inet(['-Dhpss'])
229
230
        branch = BzrDir.open_from_transport(transport).open_branch()
230
231
        self.make_read_requests(branch)