1 # Copyright (C) 2017 Jelmer Vernooij <jelmer@jelmer.uk>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU Lesser General Public License as published by
5 # the Free Software Foundation; either version 2.1 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 """Subversion subr library tests."""
18 from unittest import TestCase
20 from subvertpy.subr import uri_canonicalize
23 class UriCanonicalizeTests(TestCase):
25 def test_canonicalize(self):
27 'https://www.example.com',
28 uri_canonicalize('https://www.example.com/'))
30 'https://www.example.com(bla)',
31 uri_canonicalize('https://www.example.com(bla)'))
33 'https://www.example.com/(bla)',
34 uri_canonicalize('https://www.example.com/(bla%29'))