diff options
| author | Tony Locke <tlocke@tlocke.org.uk> | 2014-08-24 16:33:29 +0100 |
|---|---|---|
| committer | Tony Locke <tlocke@tlocke.org.uk> | 2014-12-16 20:55:55 +0000 |
| commit | 8038cfa0771ff860f48967a6800477ce8a508d65 (patch) | |
| tree | 5a6cf9142479488f5fc081365f387e3b91fc583a /test/dialect/postgresql | |
| parent | 7cd4362924dd0133a604d4a0c52f1566acbd31ff (diff) | |
| download | sqlalchemy-8038cfa0771ff860f48967a6800477ce8a508d65.tar.gz | |
pg8000 client_encoding in create_engine()
The pg8000 dialect now supports the setting of the PostgreSQL parameter
client_encoding from create_engine().
Diffstat (limited to 'test/dialect/postgresql')
| -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'], |
