From f3b377ab6ba580dc5eda28b3e53024b841226bd0 Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Fri, 4 May 2012 14:55:13 +0000 Subject: Change LocalRepoCache to use the new RepoAliasResolver. --- morphlib/localrepocache_tests.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'morphlib/localrepocache_tests.py') diff --git a/morphlib/localrepocache_tests.py b/morphlib/localrepocache_tests.py index 176becc7..47f92a1d 100644 --- a/morphlib/localrepocache_tests.py +++ b/morphlib/localrepocache_tests.py @@ -24,10 +24,10 @@ class LocalRepoCacheTests(unittest.TestCase): def setUp(self): aliases = ['upstream=git://example.com/#example.com:%s.git'] + repo_resolver = morphlib.repoaliasresolver.RepoAliasResolver(aliases) bundle_base_url = 'http://lorry.example.com/bundles/' self.reponame = 'upstream:reponame' self.repourl = 'git://example.com/reponame' - self.pushurl = 'example.com:reponame.git' escaped_url = 'git___example_com_reponame' self.bundle_url = '%s%s.bndl' % (bundle_base_url, escaped_url) self.cachedir = '/cache/dir' @@ -36,9 +36,8 @@ class LocalRepoCacheTests(unittest.TestCase): self.remotes = {} self.fetched = [] self.removed = [] - self.lrc = morphlib.localrepocache.LocalRepoCache(self.cachedir, - aliases, - bundle_base_url) + self.lrc = morphlib.localrepocache.LocalRepoCache( + self.cachedir, repo_resolver, bundle_base_url) self.lrc._git = self.fake_git self.lrc._exists = self.fake_exists self.lrc._fetch = self.not_found @@ -78,18 +77,6 @@ class LocalRepoCacheTests(unittest.TestCase): self.cache.add(path) return True - def test_expands_shortened_url_correctly_for_pulling(self): - self.assertEqual(self.lrc.pull_url(self.reponame), self.repourl) - - def test_expands_shortened_url_correctly_for_pushing(self): - self.assertEqual(self.lrc.push_url(self.reponame), self.pushurl) - - def test_expands_full_url_correctly_for_pulling(self): - self.assertEqual(self.lrc.pull_url(self.repourl), self.repourl) - - def test_expands_full_url_correctly_for_pushing(self): - self.assertEqual(self.lrc.push_url(self.pushurl), self.pushurl) - def test_has_not_got_shortened_repo_initially(self): self.assertFalse(self.lrc.has_repo(self.reponame)) -- cgit v1.2.1