OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
urllib3
/
test
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/11/2024 09:39:44 AM
rwxr-xr-x
📄
__init__.py
10.11 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
conftest.py
12.06 KB
06/17/2024 08:00:39 AM
rw-r--r--
📁
contrib
-
06/17/2024 08:00:39 AM
rwxr-xr-x
📄
port_helpers.py
6.08 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_collections.py
13.97 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_compatibility.py
692 bytes
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_connection.py
12.46 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_connectionpool.py
22.24 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_exceptions.py
2.11 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_fields.py
4.33 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_filepost.py
3.66 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_no_ssl.py
978 bytes
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_poolmanager.py
18.36 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_proxymanager.py
3.57 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_queue_monkeypatch.py
761 bytes
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_response.py
56.37 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_retry.py
16.32 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_ssl.py
7.63 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_ssltransport.py
20.63 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_util.py
42.74 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
test_wait.py
5.86 KB
06/17/2024 08:00:39 AM
rw-r--r--
📄
tz_stub.py
1.16 KB
06/17/2024 08:00:39 AM
rw-r--r--
📁
with_dummyserver
-
06/17/2024 08:00:39 AM
rwxr-xr-x
Editing: test_no_ssl.py
Close
""" Test what happens if Python was built without SSL * Everything that does not involve HTTPS should still work * HTTPS requests must fail with an error that points at the ssl module """ from __future__ import annotations import sys from test import ImportBlocker, ModuleStash import pytest ssl_blocker = ImportBlocker("ssl", "_ssl") module_stash = ModuleStash("urllib3") class TestWithoutSSL: @classmethod def setup_class(cls) -> None: sys.modules.pop("ssl", None) sys.modules.pop("_ssl", None) module_stash.stash() sys.meta_path.insert(0, ssl_blocker) @classmethod def teardown_class(cls) -> None: sys.meta_path.remove(ssl_blocker) module_stash.pop() class TestImportWithoutSSL(TestWithoutSSL): def test_cannot_import_ssl(self) -> None: with pytest.raises(ImportError): import ssl # noqa: F401 def test_import_urllib3(self) -> None: import urllib3 # noqa: F401