~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bugtracker.py

  • Committer: Jonathan Lange
  • Date: 2007-04-20 03:19:43 UTC
  • mto: This revision was merged to the branch mainline in revision 2446.
  • Revision ID: jml@canonical.com-20070420031943-ufx3jtikoxp0mlpb
Tests for builtin trackers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
 
18
import unittest
 
19
 
18
20
from bzrlib import bugtracker
19
21
from bzrlib import errors
20
22
from bzrlib.tests import TestCaseWithMemoryTransport
61
63
        self.assertEqual([('get', 'xxx', branch)], self.tracker_type.log)
62
64
 
63
65
 
 
66
class TestBuiltinTrackers(TestCaseWithMemoryTransport):
 
67
    """Test that the builtin trackers are registered and return sane URLs."""
 
68
 
 
69
    def test_launchpad_registered(self):
 
70
        """The Launchpad bug tracker should be registered by default and
 
71
        generate Launchpad bug page URLs.
 
72
        """
 
73
        branch = self.make_branch('some_branch')
 
74
        tracker = bugtracker.tracker_registry.get_tracker('lp', branch)
 
75
        self.assertEqual('https://launchpad.net/bugs/1234',
 
76
                         tracker.get_bug_url('1234'))
 
77
 
 
78
    def test_debian_registered(self):
 
79
        """The Debian bug tracker should be registered by default and generate
 
80
        bugs.debian.org bug page URLs.
 
81
        """
 
82
        branch = self.make_branch('some_branch')
 
83
        tracker = bugtracker.tracker_registry.get_tracker('deb', branch)
 
84
        self.assertEqual('http://bugs.debian.org/1234',
 
85
                         tracker.get_bug_url('1234'))
 
86
 
 
87
 
64
88
class TestUniqueBugTracker(TestCaseWithMemoryTransport):
65
89
 
66
90
    def test_check_bug_id_passes(self):