summaryrefslogtreecommitdiff
path: root/morphlib/repocache_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/repocache_tests.py')
-rw-r--r--morphlib/repocache_tests.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/morphlib/repocache_tests.py b/morphlib/repocache_tests.py
index 32af4591..9605a177 100644
--- a/morphlib/repocache_tests.py
+++ b/morphlib/repocache_tests.py
@@ -84,11 +84,9 @@ class TestableRepoCache(morphlib.repocache.RepoCache):
else:
raise NotImplementedError()
- def _new_cached_repo_instance(self, *args, **kwargs):
- with morphlib.gitdir_tests.allow_nonexistant_git_repos():
- repo = morphlib.cachedrepo.CachedRepo(*args, **kwargs)
- repo.update = lambda: None
- return repo
+ def _update_repo(self, cached_repo):
+ pass
+
class RepoCacheTests(unittest.TestCase):
@@ -153,8 +151,9 @@ class RepoCacheTests(unittest.TestCase):
repo_cache = TestableRepoCache()
repo_cache.fs.makedir('/local/repo', recursive=True)
- cached = repo_cache.get_updated_repo('file:///local/repo', refs='master')
- assert cached.path == '/local/repo'
+ with morphlib.gitdir_tests.allow_nonexistant_git_repos():
+ cached = repo_cache.get_updated_repo('file:///local/repo', refs='master')
+ assert cached.dirname == '/local/repo'
def test_no_git_update_setting(self):
repo_cache = TestableRepoCache(update_gits=False)