forked from dacort/athena-federation-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
from .handler import lambda_handler | ||
|
||
|
||
def test_lambda_handler(): | ||
def test_handler(): | ||
# This is a simple test that checks if the lambda handler can be called | ||
# without throwing an exception. | ||
lambda_handler({}, {}) | ||
lambda_handler( | ||
{ | ||
"queryId": "1681559a-548b-4771-874c-2aa2ea7c39ab", | ||
}, | ||
{}, | ||
) | ||
assert True | ||
|
||
|
||
def test_ping(): | ||
result = lambda_handler( | ||
{ | ||
"@type": "PingRequest", | ||
"catalogName": "athena_python_sdk", | ||
"queryId": "1681559a-548b-4771-874c-2aa2ea7c39ab", | ||
"sourceType": "athena_python_sdk", | ||
"capabilities": 23, | ||
}, | ||
{}, | ||
) | ||
assert result | ||
|
||
|
||
def test_schemas(): | ||
lambda_handler( | ||
{ | ||
"@type": "ListSchemasRequest", | ||
"catalogName": "athena_python_sdk", | ||
"schemas": ["sampledb"], | ||
"requestType": "LIST_SCHEMAS", | ||
}, | ||
{}, | ||
) | ||
assert True |