lister: Type correctly the 'indexable' column
instead of converting that column as a string As a side effect, bitbucket wise, we provided improperly the after query parameter as a date not url encoded. This resulted in improper api response from bitbucket's (we received from time to time the same next index as the current one). Related T1826
This commit is contained in:
parent
b99617f976
commit
3d473c307c
8 changed files with 85 additions and 44 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2017-2018 the Software Heritage developers
|
||||
# Copyright (C) 2017-2019 the Software Heritage developers
|
||||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
|
@ -19,10 +19,11 @@ class GitHubListerTester(HttpListerTester, unittest.TestCase):
|
|||
first_index = 26
|
||||
last_index = 368
|
||||
entries_per_page = 100
|
||||
convert_type = int
|
||||
|
||||
def response_headers(self, request):
|
||||
headers = {'X-RateLimit-Remaining': '1'}
|
||||
if self.request_index(request) == str(self.first_index):
|
||||
if self.request_index(request) == self.first_index:
|
||||
headers.update({
|
||||
'Link': '<https://api.github.com/repositories?since=367>;'
|
||||
' rel="next",'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue