~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-07 20:29:45 UTC
  • mfrom: (4867.2.2 lp-open-containing)
  • Revision ID: pqm@pqm.ubuntu.com-20091207202945-iwelfw14uf2mpn44
(nmb) Use open-containing for 'bzr lp-open'

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for the launchpad-open command."""
18
18
 
19
19
from bzrlib.tests import TestCaseWithTransport
 
20
import os
20
21
 
21
22
 
22
23
class TestLaunchpadOpen(TestCaseWithTransport):
87
88
            ['Opening https://code.edge.launchpad.net/~foo/bar/baz in web '
88
89
             'browser'],
89
90
            self.run_open('bzr+ssh://bazaar.launchpad.net/~foo/bar/baz'))
 
91
 
 
92
    def test_launchpad_branch_subdirectory(self):
 
93
        # lp-open in a subdirectory of a registered branch should work
 
94
        wt = self.make_branch_and_tree('lp')
 
95
        wt.branch.set_push_location(
 
96
            'bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
 
97
        self.build_tree(['lp/a/'])
 
98
        os.chdir('lp/a')
 
99
        self.assertEqual(
 
100
            ['Opening https://code.edge.launchpad.net/~foo/bar/baz in web '
 
101
             'browser'],
 
102
            self.run_open('.'))