summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/fixtures.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/fixtures.py')
-rw-r--r--lib/sqlalchemy/testing/fixtures.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py
index 209ea415e..ac4d3d8fa 100644
--- a/lib/sqlalchemy/testing/fixtures.py
+++ b/lib/sqlalchemy/testing/fixtures.py
@@ -176,7 +176,6 @@ class TablesTest(TestBase):
cls.bind = cls.setup_bind()
cls._tables_metadata = sa.MetaData()
- cls._tables_metadata.bind = cls.bind
@classmethod
def _setup_once_inserts(cls):
@@ -354,6 +353,12 @@ def create_session(**kw):
return sa.orm.Session(config.db, **kw)
+def fixture_session(**kw):
+ kw.setdefault("autoflush", True)
+ kw.setdefault("expire_on_commit", True)
+ return sa.orm.Session(config.db, **kw)
+
+
class ORMTest(_ORMTest, TestBase):
pass