summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/suite/test_cte.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2020-04-12 07:03:25 -0600
committerGord Thompson <gord@gordthompson.com>2020-04-12 07:03:25 -0600
commitf564a15feca1dcead62a12b496940a863d5165c1 (patch)
treed5e5a1e5a43a32fe56abde29021d5bc43a490e8b /lib/sqlalchemy/testing/suite/test_cte.py
parent43bcb0de1ecc1dc2abd7e7c3eb0c39f3eab9adc0 (diff)
downloadsqlalchemy-f564a15feca1dcead62a12b496940a863d5165c1.tar.gz
Clean up .execute calls in remaining suite tests
Change-Id: Ib5c7f46067bcf5b162060476cc323bf671db101a
Diffstat (limited to 'lib/sqlalchemy/testing/suite/test_cte.py')
-rw-r--r--lib/sqlalchemy/testing/suite/test_cte.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_cte.py b/lib/sqlalchemy/testing/suite/test_cte.py
index c7e6a266c..fab457606 100644
--- a/lib/sqlalchemy/testing/suite/test_cte.py
+++ b/lib/sqlalchemy/testing/suite/test_cte.py
@@ -37,16 +37,17 @@ class CTETest(fixtures.TablesTest):
@classmethod
def insert_data(cls):
- config.db.execute(
- cls.tables.some_table.insert(),
- [
- {"id": 1, "data": "d1", "parent_id": None},
- {"id": 2, "data": "d2", "parent_id": 1},
- {"id": 3, "data": "d3", "parent_id": 1},
- {"id": 4, "data": "d4", "parent_id": 3},
- {"id": 5, "data": "d5", "parent_id": 3},
- ],
- )
+ with config.db.connect() as conn:
+ conn.execute(
+ cls.tables.some_table.insert(),
+ [
+ {"id": 1, "data": "d1", "parent_id": None},
+ {"id": 2, "data": "d2", "parent_id": 1},
+ {"id": 3, "data": "d3", "parent_id": 1},
+ {"id": 4, "data": "d4", "parent_id": 3},
+ {"id": 5, "data": "d5", "parent_id": 3},
+ ],
+ )
def test_select_nonrecursive_round_trip(self):
some_table = self.tables.some_table