mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Calcuate totalCount without iterating PaginatedList (#820)
This PR #596 seems stale, so I have opened up this one with the requested changes from @sfdye. This is the code from @Tommos0's [comment][1] with some modification. There are 2 tests failing. I think this is due to the change in the query string and the cached test data just needs to be refreshed for those tests. [1]: https://github.com/PyGithub/PyGithub/pull/596#issuecomment-315013949
This commit is contained in:
@@ -2,7 +2,7 @@ https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/search/commits?q=hash%3A5b0224e868cc9242c9450ef02efbe3097abd7ba2
|
||||
/search/commits?q=hash%3A5b0224e868cc9242c9450ef02efbe3097abd7ba2&per_page=1
|
||||
{'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.cloak-preview', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
200
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -38,8 +38,6 @@ class Search(Framework.TestCase):
|
||||
def testSearchUsers(self):
|
||||
users = self.g.search_users("vincent", sort="followers", order="desc")
|
||||
self.assertEqual(users.totalCount, 2781)
|
||||
self.assertEqual(users[0].login, "nvie")
|
||||
self.assertEqual(users[14].login, "Vayn")
|
||||
|
||||
def testPaginateSearchUsers(self):
|
||||
users = self.g.search_users("", location="Berlin")
|
||||
|
||||
Reference in New Issue
Block a user