# Path: firebase_admin/_http_client.py
#     _ANY_METHOD = {'allowed_methods': None}
#     _ANY_METHOD = {'method_whitelist': None}
# DEFAULT_RETRY_CONFIG = retry.Retry(
#     connect=1, read=1, status=4, status_forcelist=[500, 503],
#     raise_on_status=False, backoff_factor=0.5, **_ANY_METHOD)
# DEFAULT_TIMEOUT_SECONDS = 120
# class HttpClient:
# class JsonHttpClient(HttpClient):
#     def __init__(
#             self, credential=None, session=None, base_url='', headers=None,
#             retries=DEFAULT_RETRY_CONFIG, timeout=DEFAULT_TIMEOUT_SECONDS):
#     def session(self):
#     def base_url(self):
#     def timeout(self):
#     def parse_body(self, resp):
#     def request(self, method, url, **kwargs):
#     def headers(self, method, url, **kwargs):
#     def body_and_response(self, method, url, **kwargs):
#     def body(self, method, url, **kwargs):
#     def headers_and_body(self, method, url, **kwargs):
#     def close(self):
#     def __init__(self, **kwargs):
#     def parse_body(self, resp):
# 
# Path: tests/testutils.py
# def resource_filename(filename):
# def resource(filename):
# def cleanup_apps():
# def run_without_project_id(func):
# def new_monkeypatch():
#     def __init__(self, status, response):
#     def status(self):
#     def headers(self):
#     def data(self):
#     def __init__(self, status, response):
#     def __call__(self, *args, **kwargs): # pylint: disable=arguments-differ
#     def __init__(self, error):
#     def __call__(self, *args, **kwargs): # pylint: disable=arguments-differ
#     def refresh(self, request):
#     def __init__(self):
#     def get_credential(self):
#     def __init__(self, responses, statuses, recorder):
#     def send(self, request, **kwargs): # pylint: disable=arguments-differ
#     def __init__(self, data, status, recorder):
#     def status(self):
#     def data(self):
# class MockResponse(transport.Response):
# class MockRequest(transport.Request):
# class MockFailedRequest(transport.Request):
# class MockGoogleCredential(credentials.Credentials):
# class MockCredential(firebase_admin.credentials.Base):
# class MockMultiRequestAdapter(adapters.HTTPAdapter):
# class MockAdapter(MockMultiRequestAdapter):


import pytest
import requests
from pytest_localserver import http
from firebase_admin import _http_client
from tests import testutils
    assert len(recorder) == 1
    assert recorder[0].method == 'GET'
    assert recorder[0].url == _TEST_URL

def test_http_client_custom_session():
    session = requests.Session()
    client = _http_client.HttpClient(session=session)
    assert client.session is session
    assert client.base_url == ''
    recorder = _instrument(client, 'body')
    resp = client.request('get', _TEST_URL)
    assert resp.status_code == 200
    assert resp.text == 'body'
    assert len(recorder) == 1
    assert recorder[0].method == 'GET'
    assert recorder[0].url == _TEST_URL

def test_base_url():
    client = _http_client.HttpClient(base_url=_TEST_URL)
    assert client.session is not None
    assert client.base_url == _TEST_URL
    recorder = _instrument(client, 'body')
    resp = client.request('get', 'foo')
    assert resp.status_code == 200
    assert resp.text == 'body'
    assert len(recorder) == 1
    assert recorder[0].method == 'GET'
    assert recorder[0].url == _TEST_URL + 'foo'

def test_credential():

# Path: firebase_admin/_http_client.py
#     _ANY_METHOD = {'allowed_methods': None}
#     _ANY_METHOD = {'method_whitelist': None}
# DEFAULT_RETRY_CONFIG = retry.Retry(
#     connect=1, read=1, status=4, status_forcelist=[500, 503],
#     raise_on_status=False, backoff_factor=0.5, **_ANY_METHOD)
# DEFAULT_TIMEOUT_SECONDS = 120
# class HttpClient:
# class JsonHttpClient(HttpClient):
#     def __init__(
#             self, credential=None, session=None, base_url='', headers=None,
#             retries=DEFAULT_RETRY_CONFIG, timeout=DEFAULT_TIMEOUT_SECONDS):
#     def session(self):
#     def base_url(self):
#     def timeout(self):
#     def parse_body(self, resp):
#     def request(self, method, url, **kwargs):
#     def headers(self, method, url, **kwargs):
#     def body_and_response(self, method, url, **kwargs):
#     def body(self, method, url, **kwargs):
#     def headers_and_body(self, method, url, **kwargs):
#     def close(self):
#     def __init__(self, **kwargs):
#     def parse_body(self, resp):
# 
# Path: tests/testutils.py
# def resource_filename(filename):
# def resource(filename):
# def cleanup_apps():
# def run_without_project_id(func):
# def new_monkeypatch():
#     def __init__(self, status, response):
#     def status(self):
#     def headers(self):
#     def data(self):
#     def __init__(self, status, response):
#     def __call__(self, *args, **kwargs): # pylint: disable=arguments-differ
#     def __init__(self, error):
#     def __call__(self, *args, **kwargs): # pylint: disable=arguments-differ
#     def refresh(self, request):
#     def __init__(self):
#     def get_credential(self):
#     def __init__(self, responses, statuses, recorder):
#     def send(self, request, **kwargs): # pylint: disable=arguments-differ
#     def __init__(self, data, status, recorder):
#     def status(self):
#     def data(self):
# class MockResponse(transport.Response):
# class MockRequest(transport.Request):
# class MockFailedRequest(transport.Request):
# class MockGoogleCredential(credentials.Credentials):
# class MockCredential(firebase_admin.credentials.Base):
# class MockMultiRequestAdapter(adapters.HTTPAdapter):
# class MockAdapter(MockMultiRequestAdapter):


# Path: tests/test_http_client.py
import pytest
import requests
from pytest_localserver import http
from firebase_admin import _http_client
from tests import testutils

    assert len(recorder) == 1
    assert recorder[0].method == 'GET'
    assert recorder[0].url == _TEST_URL

def test_http_client_custom_session():
    session = requests.Session()
    client = _http_client.HttpClient(session=session)
    assert client.session is session
    assert client.base_url == ''
    recorder = _instrument(client, 'body')
    resp = client.request('get', _TEST_URL)
    assert resp.status_code == 200
    assert resp.text == 'body'
    assert len(recorder) == 1
    assert recorder[0].method == 'GET'
    assert recorder[0].url == _TEST_URL

def test_base_url():
    client = _http_client.HttpClient(base_url=_TEST_URL)
    assert client.session is not None
    assert client.base_url == _TEST_URL
    recorder = _instrument(client, 'body')
    resp = client.request('get', 'foo')
    assert resp.status_code == 200
    assert resp.text == 'body'
    assert len(recorder) == 1
    assert recorder[0].method == 'GET'
    assert recorder[0].url == _TEST_URL + 'foo'

def test_credential():

    client = _http_client.HttpClient(