# Path: ckan_api_client/tests/utils/http.py
# def check_response_ok(response, status_code=200):
#     """
#     .. warning:: deprecated function. Use :py:func:`check_api_v3_response`.
#     """
#     warnings.warn(
#         "check_response_ok() is deprecated -- use check_api_v3_response()",
#         DeprecationWarning)
#     return check_api_v3_response(response, status_code=status_code)


import requests
from .utils.http import check_response_ok
"""Make sure tests setup & fixtures are all fine"""



# todo: we should check all fixtures in here!


def test_site_read(ckan_url):
    """GET /site_read/ should return 200"""

    api_url = ckan_url('/api/3/action/site_read')
    response = requests.get(api_url)

# Path: ckan_api_client/tests/utils/http.py
# def check_response_ok(response, status_code=200):
#     """
#     .. warning:: deprecated function. Use :py:func:`check_api_v3_response`.
#     """
#     warnings.warn(
#         "check_response_ok() is deprecated -- use check_api_v3_response()",
#         DeprecationWarning)
#     return check_api_v3_response(response, status_code=status_code)


# Path: ckan_api_client/tests/test_00_startup_and_fixtures.py
import requests
from .utils.http import check_response_ok

"""Make sure tests setup & fixtures are all fine"""



# todo: we should check all fixtures in here!


def test_site_read(ckan_url):
    """GET /site_read/ should return 200"""

    api_url = ckan_url('/api/3/action/site_read')
    response = requests.get(api_url)

    data = check_response_ok(response)