@@ -165,6 +165,11 @@ def test__get_headers_Should_SetAcceptHeader_When_Called(self, *patches):
165165 result = client .get_headers ()
166166 self .assertEqual (result ['Accept' ], 'application/vnd.github.v3+json' )
167167
168+ def test__get_headers_Should_SetAcceptHeader_When_Version (self , * patches ):
169+ client = GitHubAPI (bearer_token = 'bearer-token' , version = 'v2' )
170+ result = client .get_headers ()
171+ self .assertEqual (result ['Accept' ], 'application/vnd.github.v2+json' )
172+
168173 def test__get_next_endpoint_Should_ReturnNone_When_NoLinkHeader (self , * patches ):
169174 client = GitHubAPI (bearer_token = 'bearer-token' )
170175 self .assertIsNone (client ._get_next_endpoint (None ))
@@ -328,11 +333,11 @@ def test__get_client_Should_CallAndReturnExpected_When_Called(self, githubapi_pa
328333 def test__get_retries_Should_ReturnExpected_When_Called (self , * patches ):
329334 client = GitHubAPI (bearer_token = 'bearer-token' )
330335 expected_retries = [
331- {
332- 'retry_on_exception' : client .retry_chunkedencodingerror_error ,
333- 'stop_max_attempt_number' : 120 ,
334- 'wait_fixed' : 10000
335- },
336+ # {
337+ # 'retry_on_exception': client.retry_chunkedencodingerror_error,
338+ # 'stop_max_attempt_number': 120,
339+ # 'wait_fixed': 10000
340+ # },
336341 {
337342 'retry_on_exception' : client .retry_ratelimit_error ,
338343 'stop_max_attempt_number' : 60 ,
@@ -344,8 +349,8 @@ def test__get_retries_Should_ReturnExpected_When_Called(self, *patches):
344349
345350 def test__retry_chunkedencodingerror_error_Should_Return_False_When_NotChunkEncodingError (self , * patches ):
346351
347- self .assertFalse (GitHubAPI .retry_chunkedencodingerror_error (Exception ('test' )))
352+ self .assertFalse (GitHubAPI ._retry_chunkedencodingerror_error (Exception ('test' )))
348353
349354 def test__retry_chunkedencodingerror_error_Should_Return_True_When_ChunkEncodingError (self , * patches ):
350355
351- self .assertTrue (GitHubAPI .retry_chunkedencodingerror_error (ChunkedEncodingError ()))
356+ self .assertTrue (GitHubAPI ._retry_chunkedencodingerror_error (ChunkedEncodingError ()))
0 commit comments