diff options
Diffstat (limited to 'test/dialect/postgresql/test_dialect.py')
| -rw-r--r-- | test/dialect/postgresql/test_dialect.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index b751bbcdd..cf470f055 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -99,11 +99,13 @@ class MiscTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): assert 'will create implicit sequence' in msgs assert 'will create implicit index' in msgs - @testing.only_on('postgresql+psycopg2', 'psycopg2-specific feature') + @testing.only_on( + ['postgresql+psycopg2', 'postgresql+pg8000'], + 'psycopg2/pg8000-specific feature') @engines.close_open_connections def test_client_encoding(self): c = testing.db.connect() - current_encoding = c.connection.connection.encoding + current_encoding = c.execute("show client_encoding").fetchone()[0] c.close() # attempt to use an encoding that's not @@ -115,7 +117,8 @@ class MiscTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): e = engines.testing_engine(options={'client_encoding': test_encoding}) c = e.connect() - eq_(c.connection.connection.encoding, test_encoding) + new_encoding = c.execute("show client_encoding").fetchone()[0] + eq_(new_encoding, test_encoding) @testing.only_on( ['postgresql+psycopg2', 'postgresql+pg8000'], |
