-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow passing SSL verify to session
- Loading branch information
1 parent
bac8b60
commit e6f93d3
Showing
5 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ def test_gsheets_dialect() -> None: | |
"subject": None, | ||
"catalog": {}, | ||
"app_default_credentials": False, | ||
"session_verify": None, | ||
}, | ||
}, | ||
"safe": True, | ||
|
@@ -63,6 +64,7 @@ def test_gsheets_dialect() -> None: | |
"subject": "[email protected]", | ||
"catalog": {}, | ||
"app_default_credentials": False, | ||
"session_verify": None, | ||
}, | ||
}, | ||
"safe": True, | ||
|
@@ -88,6 +90,7 @@ def test_gsheets_dialect() -> None: | |
"subject": "[email protected]", | ||
"catalog": {"public_sheet": "https://example.com/"}, | ||
"app_default_credentials": False, | ||
"session_verify": None, | ||
}, | ||
}, | ||
"safe": True, | ||
|
@@ -111,6 +114,7 @@ def test_gsheets_dialect() -> None: | |
"subject": None, | ||
"catalog": {}, | ||
"app_default_credentials": True, | ||
"session_verify": None, | ||
}, | ||
}, | ||
"safe": True, | ||
|
@@ -121,6 +125,28 @@ def test_gsheets_dialect() -> None: | |
mock_dbapi_connection = mock.MagicMock() | ||
assert dialect.get_schema_names(mock_dbapi_connection) == [] | ||
|
||
dialect = APSWGSheetsDialect(session_verify=False) | ||
assert dialect.create_connect_args(make_url("gsheets://")) == ( | ||
(), | ||
{ | ||
"path": ":memory:", | ||
"adapters": ["gsheetsapi"], | ||
"adapter_kwargs": { | ||
"gsheetsapi": { | ||
"access_token": None, | ||
"service_account_file": None, | ||
"service_account_info": None, | ||
"subject": None, | ||
"catalog": {}, | ||
"app_default_credentials": False, | ||
"session_verify": False, | ||
}, | ||
}, | ||
"safe": True, | ||
"isolation_level": None, | ||
}, | ||
) | ||
|
||
|
||
def test_get_table_names(mocker: MockerFixture, requests_mock: Mocker) -> None: | ||
""" | ||
|