~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bugtracker.py

  • Committer: John Arbash Meinel
  • Author(s): Mark Hammond
  • Date: 2008-09-09 17:02:21 UTC
  • mto: This revision was merged to the branch mainline in revision 3697.
  • Revision ID: john@arbash-meinel.com-20080909170221-svim3jw2mrz0amp3
An updated transparent icon for bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
18
from bzrlib import bugtracker, errors, urlutils
19
 
from bzrlib.tests import TestCase, TestCaseWithMemoryTransport
 
19
from bzrlib.tests import 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']))