The error is changed in psycopg2=2.9.6

This commit is contained in:
Mikhail f. Shiryaev 2023-06-22 19:10:44 +02:00
parent 91dc6dfe34
commit b2bfe2eb87
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -111,7 +111,7 @@ def test_psql_client(started_cluster):
def test_python_client(started_cluster):
node = cluster.instances["node"]
with pytest.raises(py_psql.InternalError) as exc_info:
with pytest.raises(py_psql.OperationalError) as exc_info:
ch = py_psql.connect(
host=node.ip_address,
port=server_port,
@ -122,9 +122,7 @@ def test_python_client(started_cluster):
cur = ch.cursor()
cur.execute("select name from tables;")
assert exc_info.value.args == (
"Query execution failed.\nDB::Exception: Table default.tables doesn't exist\nSSL connection has been closed unexpectedly\n",
)
assert exc_info.value.args == ("SSL connection has been closed unexpectedly\n",)
ch = py_psql.connect(
host=node.ip_address,