/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bugtracker.py

merge bzr.dev r4164

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 
18
18
from bzrlib import bugtracker, errors, urlutils
19
 
from bzrlib.tests import TestCaseWithMemoryTransport
 
19
from bzrlib.tests import TestCase, TestCaseWithMemoryTransport
20
20
 
21
21
 
22
22
class TestGetBugURL(TestCaseWithMemoryTransport):
210
210
        """
211
211
        self.assertRaises(
212
212
            errors.MalformedBugIdentifier, self.tracker.get_bug_url, 'bad')
 
213
 
 
214
 
 
215
class TestPropertyEncoding(TestCase):
 
216
    """Tests for how the bug URLs are encoded as revision properties."""
 
217
 
 
218
    def test_encoding_one(self):
 
219
        self.assertEqual(
 
220
            'http://example.com/bugs/1 fixed',
 
221
            bugtracker.encode_fixes_bug_urls(['http://example.com/bugs/1']))
 
222
 
 
223
    def test_encoding_zero(self):
 
224
        self.assertEqual('', bugtracker.encode_fixes_bug_urls([]))
 
225
 
 
226
    def test_encoding_two(self):
 
227
        self.assertEqual(
 
228
            'http://example.com/bugs/1 fixed\n'
 
229
            'http://example.com/bugs/2 fixed',
 
230
            bugtracker.encode_fixes_bug_urls(
 
231
                ['http://example.com/bugs/1', 'http://example.com/bugs/2']))