




"""simple docstring"""




import json

import requests

from .fetch_github_info import AUTHENTICATED_USER_ENDPOINT, fetch_github_info







def       __UpperCAmelCase      (				__UpperCamelCase					):

			class        UpperCAmelCase_  :
					def __init__(		self							,		UpperCamelCase_   )		->   None:
								assert isinstance(__SCREAMING_SNAKE_CASE							,		(bytes, str)   )
								__lowercase	:       Any				=   content
					def 					_lowerCamelCase    (		self   )		->   Any:
								return json.loads(self.content   )

			def mock_response(*__UpperCamelCase					,							**__UpperCamelCase					):
						assert args[0] == AUTHENTICATED_USER_ENDPOINT
						assert "Authorization" in kwargs["headers"]
						assert kwargs["headers"]["Authorization"].startswith('''token '''					)
						assert "Accept" in kwargs["headers"]
						return FakeResponse(B'''{"login":"test","id":1}'''					)

			monkeypatch.setattr(snake_case__					,							'''get'''					,							snake_case__					)
			__lowercase	:       int				=   fetch_github_info('''token'''					)
			assert result["login"] == "test"
			assert result["id"] == 1






"""simple docstring"""




def       __UpperCAmelCase      (				__UpperCamelCase					):
			if len(__UpperCamelCase					) <= 1:
						return data
			else:
						return [
						    *quick_sort([e for e in data[1:] if e <= data[0]]					),
						    data[0],
						    *quick_sort([e for e in data[1:] if e > data[0]]					),
						]


if __name__ == "__main__":
			import doctest

			doctest.testmod()



