~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bugtracker.py

  • Committer: Alexander Belchenko
  • Date: 2007-12-05 20:12:27 UTC
  • mfrom: (3079 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3083.
  • Revision ID: bialix@ukr.net-20071205201227-9uiwuzrgzge15e5e
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        self.assertEqual('http://bugs.com/show_bug.cgi?id=1234',
105
105
                         tracker.get_bug_url('1234'))
106
106
 
 
107
    def test_generic_registered(self):
 
108
        branch = self.make_branch('some_branch')
 
109
        config = branch.get_config()
 
110
        config.set_user_option('bugtracker_foo_url', 'http://bugs.com/{id}/view.html')
 
111
        tracker = bugtracker.tracker_registry.get_tracker('foo', branch)
 
112
        self.assertEqual('http://bugs.com/1234/view.html',
 
113
                         tracker.get_bug_url('1234'))
 
114
 
 
115
    def test_generic_incorrect_url(self):
 
116
        branch = self.make_branch('some_branch')
 
117
        config = branch.get_config()
 
118
        config.set_user_option('bugtracker_foo_url', 'http://bugs.com/view.html')
 
119
        tracker = bugtracker.tracker_registry.get_tracker('foo', branch)
 
120
        self.assertRaises(errors.InvalidBugTrackerURL, tracker.get_bug_url, '1234')
 
121
 
107
122
 
108
123
class TestUniqueIntegerBugTracker(TestCaseWithMemoryTransport):
109
124