comparison tests/test_urls.py @ 235:2969a20e0eef

Add support for user:pass@url repositories to be hg-like
author Daniel Tang <dytang@cs.purdue.edu>
date Mon, 06 Apr 2009 11:19:51 -0400
parents
children 46e69be8e2c8
comparison
equal deleted inserted replaced
234:33e885f5f86a 235:2969a20e0eef
1 import test_util
2 import unittest
3 from svnwrap.svn_swig_wrapper import parse_url
4
5 class TestSubversionUrls(test_util.TestBase):
6 def test_standard_url(self):
7 self.assertEqual((None, None, 'file:///var/svn/repo'),
8 parse_url('file:///var/svn/repo'))
9
10 def test_user_url(self):
11 self.assertEqual(('joe', None, 'https://svn.testurl.com/repo'),
12 parse_url('https://joe@svn.testurl.com/repo'))
13
14 def test_password_url(self):
15 self.assertEqual((None, 't3stpw', 'svn+ssh://svn.testurl.com/repo'),
16 parse_url('svn+ssh://:t3stpw@svn.testurl.com/repo'))
17
18 def test_user_password_url(self):
19 self.assertEqual(('joe', 't3stpw', 'https://svn.testurl.com/repo'),
20 parse_url('https://joe:t3stpw@svn.testurl.com/repo'))
21
22
23 def suite():
24 all = [unittest.TestLoader().loadTestsFromTestCase(TestSubversionUrls)]
25 return unittest.TestSuite(all)