~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/test_lp_directory.py

  • Committer: Martin Pool
  • Date: 2009-03-24 05:21:02 UTC
  • mfrom: (4192 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4202.
  • Revision ID: mbp@sourcefrog.net-20090324052102-8kk087b32tep3d9h
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    )
24
24
from bzrlib.branch import Branch
25
25
from bzrlib.directory_service import directories
26
 
from bzrlib.tests import TestCase, TestCaseWithMemoryTransport
 
26
from bzrlib.tests import (
 
27
    TestCaseInTempDir,
 
28
    TestCaseWithMemoryTransport
 
29
)
27
30
from bzrlib.transport import get_transport
28
31
from bzrlib.plugins.launchpad import _register_directory
29
32
from bzrlib.plugins.launchpad.lp_directory import (
46
49
        return self._result
47
50
 
48
51
 
49
 
class DirectoryUrlTests(TestCase):
 
52
class DirectoryUrlTests(TestCaseInTempDir):
50
53
    """Tests for branch urls through Launchpad.net directory"""
51
54
 
52
55
    def test_short_form(self):
146
149
                    'http://bazaar.launchpad.net/~apt/apt/devel']))
147
150
        directory = LaunchpadDirectory()
148
151
        self.assertEquals(
149
 
            'bzr+ssh://username@bazaar.launchpad.net/~apt/apt/devel',
 
152
            'bzr+ssh://bazaar.launchpad.net/~apt/apt/devel',
150
153
            directory._resolve('lp:///apt', factory, _lp_login='username'))
151
154
 
152
155
    def test_no_rewrite_of_other_bzr_ssh(self):
153
 
        # Test that we don't rewrite bzr+ssh URLs for other 
 
156
        # Test that we don't rewrite bzr+ssh URLs for other
154
157
        self.assertEqual(None, get_lp_login())
155
158
        factory = FakeResolveFactory(
156
159
            self, 'apt', dict(urls=[