diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-05-26 10:56:23 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-05-26 10:56:23 -0400 |
commit | a50dcb31b9757ca7602b85458615b7c267454cf9 (patch) | |
tree | e124f54ca5d0e0d229b14a5effe6b0563f086cd0 /test/engine/test_parseconnect.py | |
parent | 88f547900276ff969ca25d24287fd5f96eeec49c (diff) | |
download | sqlalchemy-a50dcb31b9757ca7602b85458615b7c267454cf9.tar.gz |
- Fixed bug where known boolean values used by
:func:`.engine_from_config` were not being parsed correctly;
these included ``pool_threadlocal`` and the psycopg2 argument
``use_native_unicode``. fixes #3435
- add legacy_schema_aliasing config parsing for mssql
- move use_native_unicode config arg to the psycopg2 dialect
Diffstat (limited to 'test/engine/test_parseconnect.py')
-rw-r--r-- | test/engine/test_parseconnect.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/engine/test_parseconnect.py b/test/engine/test_parseconnect.py index fb1f338e6..4601a6bda 100644 --- a/test/engine/test_parseconnect.py +++ b/test/engine/test_parseconnect.py @@ -138,6 +138,23 @@ class CreateEngineTest(fixtures.TestBase): 'z=somevalue') assert e.echo is True + def test_pool_threadlocal_from_config(self): + dbapi = mock_dbapi + + config = { + 'sqlalchemy.url': 'postgresql://scott:tiger@somehost/test', + 'sqlalchemy.pool_threadlocal': "false"} + + e = engine_from_config(config, module=dbapi, _initialize=False) + eq_(e.pool._use_threadlocal, False) + + config = { + 'sqlalchemy.url': 'postgresql://scott:tiger@somehost/test', + 'sqlalchemy.pool_threadlocal': "true"} + + e = engine_from_config(config, module=dbapi, _initialize=False) + eq_(e.pool._use_threadlocal, True) + def test_pool_reset_on_return_from_config(self): dbapi = mock_dbapi |