diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2020-08-05 04:49:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-08-05 04:49:57 +0000 |
commit | ba9380ef28871b2274ab0bab75e5efddf2ced467 (patch) | |
tree | a69613dca1434c25ed2b8bfb877338206213f4e4 /lib/sqlalchemy/testing/fixtures.py | |
parent | c813fe1678c4edbce32f0652353ed70f0a14566f (diff) | |
parent | 14fdd6260a578488bdad95b738ea6af5c2fcd13c (diff) | |
download | sqlalchemy-ba9380ef28871b2274ab0bab75e5efddf2ced467.tar.gz |
Merge "Establish future behavior for Session cascade backrefs, bind"
Diffstat (limited to 'lib/sqlalchemy/testing/fixtures.py')
-rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 1eac76598..1583147d4 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -293,13 +293,14 @@ class TablesTest(TestBase): continue if table not in headers: continue - cls.bind.execute( - table.insert(), - [ - dict(zip(headers[table], column_values)) - for column_values in rows[table] - ], - ) + with cls.bind.begin() as conn: + conn.execute( + table.insert(), + [ + dict(zip(headers[table], column_values)) + for column_values in rows[table] + ], + ) class RemovesEvents(object): |