diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2020-04-15 18:31:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-04-15 18:31:30 +0000 |
commit | bd303b10e2bf69169f07447c7272fc71ac931f10 (patch) | |
tree | 7d2b6b21fbf880062e0bfddd31c85382bf11ccf1 /lib/sqlalchemy/testing/fixtures.py | |
parent | 447c0750e1f739c4db1d0d20de182c297dc86e36 (diff) | |
parent | 8725d89abaf1a6ce870e71fbf1a4962dc4899204 (diff) | |
download | sqlalchemy-bd303b10e2bf69169f07447c7272fc71ac931f10.tar.gz |
Merge "Pass connection to TablesTest.insert_data()"
Diffstat (limited to 'lib/sqlalchemy/testing/fixtures.py')
-rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 4f6083401..e5e6c42fc 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -135,7 +135,8 @@ class TablesTest(TestBase): def _setup_once_inserts(cls): if cls.run_inserts == "once": cls._load_fixtures() - cls.insert_data() + with cls.bind.begin() as conn: + cls.insert_data(conn) @classmethod def _setup_once_tables(cls): @@ -157,7 +158,8 @@ class TablesTest(TestBase): def _setup_each_inserts(self): if self.run_inserts == "each": self._load_fixtures() - self.insert_data() + with self.bind.begin() as conn: + self.insert_data(conn) def _teardown_each_tables(self): if self.run_define_tables == "each": @@ -224,7 +226,7 @@ class TablesTest(TestBase): return {} @classmethod - def insert_data(cls): + def insert_data(cls, connection): pass def sql_count_(self, count, fn): |