summaryrefslogtreecommitdiff
path: root/morphlib/localrepocache_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-05-03 14:09:49 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-05-04 14:24:07 +0100
commit223475d1059e15ee75366354ab1a88dfdf2afac0 (patch)
tree20b529daaf576906e31b4714bb6380e3e9e49e26 /morphlib/localrepocache_tests.py
parentc2767ba11c3df7da52bcdca8979afbced644a428 (diff)
downloadmorph-223475d1059e15ee75366354ab1a88dfdf2afac0.tar.gz
Add tests for repo-alias expansion
Diffstat (limited to 'morphlib/localrepocache_tests.py')
-rw-r--r--morphlib/localrepocache_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/morphlib/localrepocache_tests.py b/morphlib/localrepocache_tests.py
index dfa92518..5ee28a99 100644
--- a/morphlib/localrepocache_tests.py
+++ b/morphlib/localrepocache_tests.py
@@ -27,6 +27,7 @@ class LocalRepoCacheTests(unittest.TestCase):
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'
@@ -77,6 +78,12 @@ 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.repourl)
+
def test_has_not_got_shortened_repo_initially(self):
self.assertFalse(self.lrc.has_repo(self.reponame))