Skip to content

Commit

Permalink
Add regression test for #390
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Oct 30, 2023
1 parent f7be0ea commit af82104
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/integration/regression/test_regression_bug390.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from sqlalchemy import create_engine


def test_connection_with_block_cleans_up_properly(exasol_config):
config = exasol_config
url = "exa+websocket://{user}:{pw}@{host}:{port}/{schema}?SSLCertificate=SSL_VERIFY_NONE"
url = url.format(
user=config.username,
pw=config.password,
host=config.host,
port=config.port,
schema="TEST",
)
engine = create_engine(url)
query = "select 42"
expected = [(42,)]

with engine.connect() as con:
actual = con.execute(query).fetchall()

assert actual == expected

0 comments on commit af82104

Please sign in to comment.