Exemple #1
0
def test_ca_bundle_path__default(c_set_ca_bundle_path_mock):
    set_ca_bundle_path()
    c_set_ca_bundle_path_mock.assert_called_with(certifi.where())
Exemple #2
0
def test_ca_bundle_path__skip(c_set_ca_bundle_path_mock):
    set_ca_bundle_path(False)
    c_set_ca_bundle_path_mock.assert_called_with("")
Exemple #3
0
def test_ca_bundle_path__custom_path(c_set_ca_bundle_path_mock, env_var):
    with patch.dict("os.environ", {env_var: "/tmp/dummy/path/cacert.pem"},
                    clear=True):
        set_ca_bundle_path("/my/path/to/cacert.pem")
    c_set_ca_bundle_path_mock.assert_called_with("/my/path/to/cacert.pem")
Exemple #4
0
def test_ca_bundle_path__always_certifi(c_set_ca_bundle_path_mock, env_var):
    with patch.dict("os.environ", {env_var: "/tmp/dummy/path/cacert.pem"},
                    clear=True):
        set_ca_bundle_path(True)
    c_set_ca_bundle_path_mock.assert_called_with(certifi.where())