From: Federico Caselli Date: Tue, 8 Sep 2020 20:00:25 +0000 (+0200) Subject: Fix typo in I0ad6d7a095e49d331618274c40ce75c76afdc7dd X-Git-Tag: rel_1_4_0b1~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=721b00e7531fe61376fb0e5eb258c5ee56c9266f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix typo in I0ad6d7a095e49d331618274c40ce75c76afdc7dd Change-Id: I649662d440f83df379922e8c967d28f635f9c85b --- diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index fd70828ff8..19570557cd 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -378,7 +378,7 @@ class PGDialect_pg8000(PGDialect): finally: cursor.close() - return val == "yes" + return val == "on" def set_deferrable(self, connection, value): cursor = connection.cursor() @@ -399,7 +399,7 @@ class PGDialect_pg8000(PGDialect): finally: cursor.close() - return val == "yes" + return val == "on" def set_client_encoding(self, connection, client_encoding): # adjust for ConnectionFairy possibly being present diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index 83bc6cac8d..13df1ce0fb 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -39,6 +39,7 @@ from sqlalchemy.engine import url from sqlalchemy.testing import engines from sqlalchemy.testing import fixtures from sqlalchemy.testing import is_ +from sqlalchemy.testing import is_true from sqlalchemy.testing import mock from sqlalchemy.testing.assertions import assert_raises from sqlalchemy.testing.assertions import assert_raises_message @@ -749,6 +750,7 @@ class MiscBackendTest( val = cursor.fetchone()[0] cursor.close() eq_(val, "on") + is_true(testing.db.dialect.get_readonly(dbapi_conn)) cursor = dbapi_conn.cursor() try: @@ -774,6 +776,7 @@ class MiscBackendTest( val = cursor.fetchone()[0] cursor.close() eq_(val, "on") + is_true(testing.db.dialect.get_deferrable(dbapi_conn)) cursor = dbapi_conn.cursor() try: