lolafect/tests/test_integration/test_connections.py
2023-01-20 15:53:45 +01:00

18 lines
No EOL
596 B
Python

import trino
from lolafect.lolaconfig import build_lolaconfig
from lolafect.connections import connect_to_trino, close_trino_connection
# This testing suite requires:
# - The calling shell to have permission in AWS
# - The calling shell to be within the Mercadão network
TEST_LOLACONFIG = build_lolaconfig(flow_name="testing-suite")
def test_that_trino_connect_and_disconnect_works_properly():
connection = connect_to_trino.run(trino_credentials=TEST_LOLACONFIG.TRINO_CREDENTIALS)
connection.cursor().execute("SELECT 1")
close_trino_connection.run(trino_connection=connection)