# Path: google/_async_resumable_media/requests/_request_helpers.py
# _DEFAULT_RETRY_STRATEGY = common.RetryStrategy()
# _SINGLE_GET_CHUNK_SIZE = 8192
# _DEFAULT_CONNECT_TIMEOUT = 61
# _DEFAULT_READ_TIMEOUT = 60
# _DEFAULT_TIMEOUT = aiohttp.ClientTimeout(
#     connect=_DEFAULT_CONNECT_TIMEOUT, sock_read=_DEFAULT_READ_TIMEOUT
# )
# class RequestsMixin(object):
# class RawRequestsMixin(RequestsMixin):
#     def _get_status_code(response):
#     def _get_headers(response):
#     async def _get_body(response):
#     async def _get_body(response):
# async def http_request(
#     transport,
#     method,
#     url,
#     data=None,
#     headers=None,
#     retry_strategy=_DEFAULT_RETRY_STRATEGY,
#     **transport_kwargs
# ):


import http.client
import io
import aiohttp  # type: ignore
import mock
import pytest  # type: ignore
from google._async_resumable_media.requests import _request_helpers as _helpers
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




# async version takes a single timeout, not a tuple of connect, read timeouts.
EXPECTED_TIMEOUT = aiohttp.ClientTimeout(connect=61, sock_read=60)


class TestRequestsMixin(object):
    def test__get_status_code(self):
        status_code = int(http.client.OK)
        response = _make_response(status_code)

# Path: google/_async_resumable_media/requests/_request_helpers.py
# _DEFAULT_RETRY_STRATEGY = common.RetryStrategy()
# _SINGLE_GET_CHUNK_SIZE = 8192
# _DEFAULT_CONNECT_TIMEOUT = 61
# _DEFAULT_READ_TIMEOUT = 60
# _DEFAULT_TIMEOUT = aiohttp.ClientTimeout(
#     connect=_DEFAULT_CONNECT_TIMEOUT, sock_read=_DEFAULT_READ_TIMEOUT
# )
# class RequestsMixin(object):
# class RawRequestsMixin(RequestsMixin):
#     def _get_status_code(response):
#     def _get_headers(response):
#     async def _get_body(response):
#     async def _get_body(response):
# async def http_request(
#     transport,
#     method,
#     url,
#     data=None,
#     headers=None,
#     retry_strategy=_DEFAULT_RETRY_STRATEGY,
#     **transport_kwargs
# ):


# Path: tests_async/unit/requests/test__helpers.py
import http.client
import io
import aiohttp  # type: ignore
import mock
import pytest  # type: ignore
from google._async_resumable_media.requests import _request_helpers as _helpers

# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




# async version takes a single timeout, not a tuple of connect, read timeouts.
EXPECTED_TIMEOUT = aiohttp.ClientTimeout(connect=61, sock_read=60)


class TestRequestsMixin(object):
    def test__get_status_code(self):
        status_code = int(http.client.OK)
        response = _make_response(status_code)

        assert status_code == _helpers.RequestsMixin._get_status_code(response)