incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [35/41] git commit: [#6535] ticket:424 Improve test for get_next_page_url
Date Thu, 19 Sep 2013 16:22:07 GMT
[#6535] ticket:424 Improve test for get_next_page_url


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

Branch: refs/heads/db/5822
Commit: 503c4f795de506f4bcade371ac3f8c6a220ea96a
Parents: 42b6445
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Sep 17 15:29:04 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Sep 19 14:46:52 2013 +0000

----------------------------------------------------------------------
 .../forgeimporters/tests/github/test_extractor.py           | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/503c4f79/ForgeImporters/forgeimporters/tests/github/test_extractor.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/github/test_extractor.py b/ForgeImporters/forgeimporters/tests/github/test_extractor.py
index e29a533..fbbdc3d 100644
--- a/ForgeImporters/forgeimporters/tests/github/test_extractor.py
+++ b/ForgeImporters/forgeimporters/tests/github/test_extractor.py
@@ -87,10 +87,17 @@ class TestGitHubProjectExtractor(TestCase):
     def test_get_next_page_url(self):
         self.assertIsNone(self.extractor.get_next_page_url(None))
         self.assertIsNone(self.extractor.get_next_page_url(''))
-        link = '<https://api.github.com/repositories/8560576/issues?state=open&page=2>;
rel="next", <https://api.github.com/repositories/8560576/issues?state=open&page=2>;
rel="last"'
+        link = '<https://api.github.com/repositories/8560576/issues?state=open&page=2>;
rel="next", <https://api.github.com/repositories/8560576/issues?state=open&page=10>;
rel="last"'
         self.assertEqual(self.extractor.get_next_page_url(link),
                 'https://api.github.com/repositories/8560576/issues?state=open&page=2')
 
+        link = '<https://api.github.com/repositories/8560576/issues?state=open&page=2>;
rel="next"'
+        self.assertEqual(self.extractor.get_next_page_url(link),
+                'https://api.github.com/repositories/8560576/issues?state=open&page=2')
+
+        link = '<https://api.github.com/repositories/8560576/issues?state=open&page=1>;
rel="prev"'
+        self.assertIsNone(self.extractor.get_next_page_url(link))
+
     def test_get_summary(self):
         self.assertEqual(self.extractor.get_summary(), 'project description')
 


Mime
View raw message