~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-04 01:45:09 UTC
  • mfrom: (3873.3.2 trivial)
  • mto: This revision was merged to the branch mainline in revision 4290.
  • Revision ID: jelmer@samba.org-20090404014509-qworcvw6gemoajoo
Merge in Martins' IPv6 literals patch.

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'))