~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010, 2012 Canonical Ltd
 
1
# Copyright (C) 2009, 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
51
51
 
52
52
    def test_launchpad_branch_with_public_location(self):
53
53
        branch = self.make_branch('lp')
54
 
        branch.set_public_branch('bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
 
54
        branch.set_public_branch(
 
55
            'bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
55
56
        self.assertEqual(
56
57
            ['Opening https://code.launchpad.net/~foo/bar/baz in web '
57
58
             'browser'],
59
60
 
60
61
    def test_launchpad_branch_with_public_and_push_location(self):
61
62
        branch = self.make_branch('lp')
62
 
        branch.lock_write()
63
 
        try:
64
 
            branch.set_public_branch(
65
 
                'bzr+ssh://bazaar.launchpad.net/~foo/bar/public')
66
 
            branch.set_push_location(
67
 
                'bzr+ssh://bazaar.launchpad.net/~foo/bar/push')
68
 
        finally:
69
 
            branch.unlock()
 
63
        branch.set_public_branch(
 
64
            'bzr+ssh://bazaar.launchpad.net/~foo/bar/public')
 
65
        branch.set_push_location(
 
66
            'bzr+ssh://bazaar.launchpad.net/~foo/bar/push')
70
67
        self.assertEqual(
71
68
            ['Opening https://code.launchpad.net/~foo/bar/public in web '
72
69
             'browser'],
76
73
        # lp-open falls back to the push location if it cannot find a public
77
74
        # location.
78
75
        branch = self.make_branch('lp')
79
 
        branch.set_push_location('bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
 
76
        branch.set_push_location(
 
77
            'bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
80
78
        self.assertEqual(
81
79
            ['Opening https://code.launchpad.net/~foo/bar/baz in web '
82
80
             'browser'],