File: requests_with_inject.py

package info (click to toggle)
python-truststore 0.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 236 kB
  • sloc: python: 1,835; makefile: 13; sh: 6
file content (14 lines) | stat: -rw-r--r-- 276 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Used by the test: test_inject.py::test_requests_work_with_inject

import sys

import truststore

truststore.inject_into_ssl()

import requests  # noqa: E402

resp = requests.request("GET", "https://localhost:9999")
assert resp.status_code == 200

sys.exit(resp.status_code)