b80290f04541f70aa50310b21655446524c83f59
[jelmer/subvertpy.git] / subvertpy / tests / test_subr.py
1 # Copyright (C) 2017 Jelmer Vernooij <jelmer@jelmer.uk>
2
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.
7
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.
12
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/>.
15
16 """Subversion subr library tests."""
17
18 from unittest import TestCase
19
20 from subvertpy.subr import uri_canonicalize
21
22
23 class UriCanonicalizeTests(TestCase):
24
25     def test_canonicalize(self):
26         self.assertEqual(
27                 'https://www.example.com',
28                 uri_canonicalize('https://www.example.com/'))
29         self.assertEqual(
30                 'https://www.example.com(bla)',
31                 uri_canonicalize('https://www.example.com(bla)'))
32         self.assertEqual(
33                 'https://www.example.com/(bla)',
34                 uri_canonicalize('https://www.example.com/(bla%29'))