comparison tests/test_urls.py @ 1534:7917abf6b456

test_urls: correctly use test_util.testui instead of ui.ui
author Augie Fackler <raf@durin42.com>
date Wed, 25 Oct 2017 22:07:53 -0400
parents d890d8d4e168
children
comparison
equal deleted inserted replaced
1533:0212c3a84ccd 1534:7917abf6b456
48 self.check_parse_url( 48 self.check_parse_url(
49 ('bob', '123abc', 'https://svn.testurl.com/repo'), 49 ('bob', '123abc', 'https://svn.testurl.com/repo'),
50 ('https://joe:t3stpw@svn.testurl.com/repo', 'bob', '123abc', )) 50 ('https://joe:t3stpw@svn.testurl.com/repo', 'bob', '123abc', ))
51 51
52 def test_url_rewriting(self): 52 def test_url_rewriting(self):
53 ui = test_util.ui.ui() 53 ui = test_util.testui()
54 ui.setconfig('hgsubversion', 'username', 'bob') 54 ui.setconfig('hgsubversion', 'username', 'bob')
55 repo = svnrepo.svnremoterepo(ui, 'svn+ssh://joe@foo/bar') 55 repo = svnrepo.svnremoterepo(ui, 'svn+ssh://joe@foo/bar')
56 self.assertEqual('svn+ssh://bob@foo/bar', repo.svnauth[0]) 56 self.assertEqual('svn+ssh://bob@foo/bar', repo.svnauth[0])
57 self.assertEqual('svn+ssh://bob@foo/bar', repo.svnurl) 57 self.assertEqual('svn+ssh://bob@foo/bar', repo.svnurl)
58 58
80 self.assertEqual(expected, parse_url(*args)) 80 self.assertEqual(expected, parse_url(*args))
81 if len(args) == 1: 81 if len(args) == 1:
82 repo = svnrepo.svnremoterepo(self.ui(), path=args[0]) 82 repo = svnrepo.svnremoterepo(self.ui(), path=args[0])
83 self.assertEqual(expected[2], repo.svnauth[0]) 83 self.assertEqual(expected[2], repo.svnauth[0])
84 self.assertEqual(expected[2], repo.svnurl) 84 self.assertEqual(expected[2], repo.svnurl)
85