~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

Some more cleanups spotted on windows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1756
1756
        branch = self.make_branch('relpath')
1757
1757
        url = self.http_server.get_url() + 'relpath'
1758
1758
        bd = bzrdir.BzrDir.open(url)
 
1759
        self.addCleanup(bd.transport.disconnect)
1759
1760
        self.assertIsInstance(bd, _mod_remote.RemoteBzrDir)
1760
1761
 
1761
1762
    def test_bulk_data(self):
2145
2146
        def redirected(t, exception, redirection_notice):
2146
2147
            self.redirections += 1
2147
2148
            redirected_t = t._redirected_to(exception.source, exception.target)
 
2149
            self.addCleanup(redirected_t.disconnect)
2148
2150
            return redirected_t
2149
2151
 
2150
2152
        stdout = tests.StringIOWrapper()
2172
2174
                                       self.new_server.port)
2173
2175
        self.old_server.redirections = [
2174
2176
            ('(.*)', r'%s/1\1' % (new_prefix), 301),]
2175
 
        self.assertEqual('redirected once',t._perform(req).read())
 
2177
        self.assertEqual('redirected once', t._perform(req).read())
2176
2178
        # stdin should be empty
2177
2179
        self.assertEqual('', ui.ui_factory.stdin.readline())
2178
2180
        # stdout should be empty, stderr will contains the prompts