allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/2] allura git commit: [#7932] add test for git paged_diffs pagination
Date Tue, 21 Jul 2015 20:26:00 GMT
Repository: allura
Updated Branches:
  refs/heads/master bbeebdbb9 -> e1ad48033


[#7932] add test for git paged_diffs pagination


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

Branch: refs/heads/master
Commit: e1ad48033b356ebed24512d154e03514168dc890
Parents: 3017300
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Jul 21 20:02:10 2015 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Jul 21 20:25:39 2015 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/tests/model/test_repository.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/e1ad4803/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 4cfd2ef..9f007e6 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -693,6 +693,24 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
         }
         assert_equals(diffs, expected)
 
+        # pagination
+        diffs = repo.paged_diffs('407950e8fba4dbc108ffbce0128ed1085c52cfd7', start=0, end=1)
+        expected = {
+            'added': [u'with space.txt'],
+            'removed': [],
+            'changed': [],
+            'total': 2,
+        }
+        assert_equals(diffs, expected)
+        diffs = repo.paged_diffs('407950e8fba4dbc108ffbce0128ed1085c52cfd7', start=1, end=2)
+        expected = {
+            'added': [u'привіт.txt'],
+            'removed': [],
+            'changed': [],
+            'total': 2,
+        }
+        assert_equals(diffs, expected)
+
     def test_merge_base(self):
         res = self.repo._impl.merge_base(self.merge_request)
         assert_equal(res, '1e146e67985dcd71c74de79613719bef7bddca4a')


Mime
View raw message