incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [6/50] [abbrv] git commit: [#5788] Fixed failing LastCommit tests
Date Tue, 05 Mar 2013 22:42:12 GMT
[#5788] Fixed failing LastCommit tests

Signed-off-by: Cory Johns <johnsca@geek.net>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/864f0dee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/864f0dee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/864f0dee

Branch: refs/heads/si/5453
Commit: 864f0dee277f21a44cbd763b54547ac1d8c07561
Parents: 61f6731
Author: Cory Johns <johnsca@geek.net>
Authored: Thu Feb 28 22:37:46 2013 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Thu Feb 28 22:37:46 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/model/test_repo.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/864f0dee/Allura/allura/tests/model/test_repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_repo.py b/Allura/allura/tests/model/test_repo.py
index 6696cb7..e4640c7 100644
--- a/Allura/allura/tests/model/test_repo.py
+++ b/Allura/allura/tests/model/test_repo.py
@@ -84,6 +84,7 @@ class TestLastCommit(unittest.TestCase):
         self.repo.commits = self._commits
         lcids = M.repository.RepositoryImplementation.last_commit_ids.__func__
         self.repo.last_commit_ids = lambda *a, **k: lcids(self.repo, *a, **k)
+        c.lcid_cache = {}
 
     def _build_tree(self, commit, path, tree_paths):
         tree_nodes = []
@@ -137,8 +138,8 @@ class TestLastCommit(unittest.TestCase):
         self.repo._commits[commit._id] = commit
         return commit
 
-    def _commits(self, path, commit_id, limit):
-        return [c._id for c in reversed(self.repo._commits.values()) if path in c.changed_paths][:limit]
+    def _commits(self, path, commit_id, skip=0, limit=-1):
+        return [c._id for c in reversed(self.repo._commits.values()) if path in c.changed_paths][skip:limit]
 
     def test_single_commit(self):
         commit1 = self._add_commit('Commit 1', [


Mime
View raw message