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:
Antoine R. Dumont (@ardumont) 2019-06-25 14:06:33 +02:00
parent b99617f976
commit 3d473c307c
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
8 changed files with 85 additions and 44 deletions

View file

@ -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
@ -18,10 +18,11 @@ class GitLabListerTester(HttpListerTesterBase, unittest.TestCase):
bad_api_response_file = 'api_empty_response.json'
first_index = 1
entries_per_page = 10
convert_type = int
def response_headers(self, request):
headers = {'RateLimit-Remaining': '1'}
if self.request_index(request) == str(self.first_index):
if self.request_index(request) == self.first_index:
headers.update({
'x-next-page': '3',
})