Conversation
| '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.
This comment was marked as spam.
Sorry, something went wrong.
| # 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| assert http.request.call_args[1]['timeout'] == 5 | ||
|
|
||
|
|
||
| class MockCredentials(object): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| pytest-localserver | ||
| urllib3 | ||
| certifi | ||
| requests |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
No description provided.