summaryrefslogtreecommitdiff
path: root/test/ext/asyncio/test_session_py3k.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-04-10 15:24:21 +0200
committerFederico Caselli <cfederico87@gmail.com>2021-04-10 15:24:21 +0200
commit3d41fad27de91800b89a199e67766066fd744103 (patch)
treec94245886d6a1a70fb09ecada2436319e75f49d1 /test/ext/asyncio/test_session_py3k.py
parentf1f1005ebf3cc62a4bbf7cf5b0a6b77e749f5c3e (diff)
downloadsqlalchemy-3d41fad27de91800b89a199e67766066fd744103.tar.gz
Fix typo that prevented setting the ``bind``
attribute of an :class:`_asyncio.AsyncSession` to the correct value. Fixes: #6220 Change-Id: I91021351b8076e4aa4139af4b2cf359b3c0404af
Diffstat (limited to 'test/ext/asyncio/test_session_py3k.py')
-rw-r--r--test/ext/asyncio/test_session_py3k.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ext/asyncio/test_session_py3k.py b/test/ext/asyncio/test_session_py3k.py
index 032176ea6..feb557471 100644
--- a/test/ext/asyncio/test_session_py3k.py
+++ b/test/ext/asyncio/test_session_py3k.py
@@ -2,6 +2,7 @@ from sqlalchemy import event
from sqlalchemy import exc
from sqlalchemy import func
from sqlalchemy import select
+from sqlalchemy import Table
from sqlalchemy import testing
from sqlalchemy import update
from sqlalchemy.ext.asyncio import AsyncSession
@@ -46,6 +47,14 @@ class AsyncSessionTest(AsyncFixture):
eq_(async_session.sync_session.info, {"foo": "bar"})
+ def test_init(self, async_engine):
+ ss = AsyncSession(bind=async_engine)
+ is_(ss.bind, async_engine)
+
+ binds = {Table: async_engine}
+ ss = AsyncSession(binds=binds)
+ is_(ss.binds, binds)
+
class AsyncSessionQueryTest(AsyncFixture):
@async_test