~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-02 08:49:07 UTC
  • mfrom: (5067.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100302084907-z4r0yoa4ldspjz82
(vila) Resolve --take-this or --take-other correctly rename kept file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2006-2010 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
50
50
    http_utils,
51
51
    )
52
52
from bzrlib.tests.test_http import TestWithTransport_pycurl
53
 
from bzrlib.transport import get_transport
 
53
from bzrlib.transport import (
 
54
    get_transport,
 
55
    memory,
 
56
    )
54
57
from bzrlib.transport.http._urllib import HttpTransport_urllib
55
 
from bzrlib.transport.memory import MemoryServer
56
58
from bzrlib.transport.nosmart import NoSmartTransportDecorator
57
59
from bzrlib.transport.readonly import ReadonlyTransportDecorator
58
60
from bzrlib.repofmt import knitrepo, weaverepo, pack_repo
145
147
        new = topics.get_detail('current-formats')
146
148
        rest = topics.get_detail('other-formats')
147
149
        experimental, deprecated = rest.split('Deprecated formats')
148
 
        self.assertContainsRe(new, 'bzr help formats')
 
150
        self.assertContainsRe(new, 'formats-help')
149
151
        self.assertContainsRe(new,
150
152
                ':knit:\n    \(native\) \(default\) Format using knits\n')
151
153
        self.assertContainsRe(experimental,
354
356
 
355
357
    def test_create_branch_convenience_root(self):
356
358
        """Creating a branch at the root of a fs should work."""
357
 
        self.vfs_transport_factory = MemoryServer
 
359
        self.vfs_transport_factory = memory.MemoryServer
358
360
        # outside a repo the default convenience output is a repo+branch_tree
359
361
        format = bzrdir.format_registry.make_bzrdir('knit')
360
362
        branch = bzrdir.BzrDir.create_branch_convenience(self.get_url(),
565
567
 
566
568
    def setUp(self):
567
569
        super(ChrootedTests, self).setUp()
568
 
        if not self.vfs_transport_factory == MemoryServer:
 
570
        if not self.vfs_transport_factory == memory.MemoryServer:
569
571
            self.transport_readonly_server = http_server.HttpServer
570
572
 
571
573
    def local_branch_path(self, branch):
1049
1051
 
1050
1052
    def setUp(self):
1051
1053
        super(NonLocalTests, self).setUp()
1052
 
        self.vfs_transport_factory = MemoryServer
 
1054
        self.vfs_transport_factory = memory.MemoryServer
1053
1055
 
1054
1056
    def test_create_branch_convenience(self):
1055
1057
        # outside a repo the default convenience output is a repo+branch_tree
1152
1154
    _transport = HttpTransport_urllib
1153
1155
 
1154
1156
    def _qualified_url(self, host, port):
1155
 
        return 'http+urllib://%s:%s' % (host, port)
 
1157
        result = 'http+urllib://%s:%s' % (host, port)
 
1158
        self.permit_url(result)
 
1159
        return result
1156
1160
 
1157
1161
 
1158
1162
 
1162
1166
    """Tests redirections for pycurl implementation"""
1163
1167
 
1164
1168
    def _qualified_url(self, host, port):
1165
 
        return 'http+pycurl://%s:%s' % (host, port)
 
1169
        result = 'http+pycurl://%s:%s' % (host, port)
 
1170
        self.permit_url(result)
 
1171
        return result
1166
1172
 
1167
1173
 
1168
1174
class TestHTTPRedirections_nosmart(TestHTTPRedirections,
1172
1178
    _transport = NoSmartTransportDecorator
1173
1179
 
1174
1180
    def _qualified_url(self, host, port):
1175
 
        return 'nosmart+http://%s:%s' % (host, port)
 
1181
        result = 'nosmart+http://%s:%s' % (host, port)
 
1182
        self.permit_url(result)
 
1183
        return result
1176
1184
 
1177
1185
 
1178
1186
class TestHTTPRedirections_readonly(TestHTTPRedirections,
1182
1190
    _transport = ReadonlyTransportDecorator
1183
1191
 
1184
1192
    def _qualified_url(self, host, port):
1185
 
        return 'readonly+http://%s:%s' % (host, port)
 
1193
        result = 'readonly+http://%s:%s' % (host, port)
 
1194
        self.permit_url(result)
 
1195
        return result
1186
1196
 
1187
1197
 
1188
1198
class TestDotBzrHidden(TestCaseWithTransport):