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())
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("")
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")
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())