Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Add requests transport#66

Merged
theacodes merged 4 commits intomasterfrom
requests-transport
Oct 31, 2016
Merged

Add requests transport#66
theacodes merged 4 commits intomasterfrom
requests-transport

Conversation

@theacodes
Copy link
Contributor

No description provided.

@theacodes theacodes added this to the 1.0.0 milestone Oct 31, 2016
'python': ('https://docs.python.org/3.5', None),
'urllib3': ('https://urllib3.readthedocs.io/en/latest', None),
'urllib3': ('https://urllib3.readthedocs.io/en/stable', None),
'requests': ('http://docs.python-requests.org/en/stable', None),

This comment was marked as spam.

# See the License for the specific language governing permissions and
# limitations under the License.

"""Transport adapter for Requests."""

This comment was marked as spam.

This comment was marked as spam.

HTTP = urllib3.PoolManager(retries=False)
URLLIB3_HTTP = urllib3.PoolManager(retries=False)
REQUESTS_SESSION = requests.Session()
REQUESTS_SESSION.verify = False

This comment was marked as spam.

This comment was marked as spam.

@pytest.fixture
def http_request():
@pytest.fixture(params=['urllib3', 'requests'])
def http_request(request):

This comment was marked as spam.

This comment was marked as spam.

assert http.request.call_args[1]['timeout'] == 5


class MockCredentials(object):

This comment was marked as spam.

This comment was marked as spam.

pytest-localserver
urllib3
certifi
requests

This comment was marked as spam.

This comment was marked as spam.

assert mock_credentials.before_request.called
assert not mock_credentials.refresh.called
assert mock_adapter.requests[0].url == self.TEST_URL
assert mock_adapter.requests[0].headers['authorization'] == 'token'

This comment was marked as spam.

This comment was marked as spam.

@theacodes theacodes merged commit 9a9ce2c into master Oct 31, 2016
@theacodes theacodes deleted the requests-transport branch October 31, 2016 21:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants