~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-15 01:33:57 UTC
  • mfrom: (4253.4.4 ipv6)
  • Revision ID: pqm@pqm.ubuntu.com-20090415013357-4e1qhuragbp9b8qu
(stlman, mbp, jelmer) Support IPv6 literals in URLs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
672
672
                         '/bar', '/bar/baz'))
673
673
        self.assertEqual('.', urlutils.determine_relative_path(
674
674
                         '/bar', '/bar'))
 
675
 
 
676
 
 
677
class TestParseURL(TestCase):
 
678
 
 
679
    def test_parse_url(self):
 
680
        self.assertEqual(urlutils.parse_url('http://example.com:80/one'),
 
681
            ('http', None, None, 'example.com', 80, '/one'))
 
682
        self.assertEqual(urlutils.parse_url('http://[1:2:3::40]/one'),
 
683
                ('http', None, None, '1:2:3::40', None, '/one'))
 
684
        self.assertEqual(urlutils.parse_url('http://[1:2:3::40]:80/one'),
 
685
                ('http', None, None, '1:2:3::40', 80, '/one'))