aboutsummaryrefslogtreecommitdiff
path: root/test_utils/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils/conftest.py')
-rw-r--r--test_utils/conftest.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/test_utils/conftest.py b/test_utils/conftest.py
index 03e9305..6894450 100644
--- a/test_utils/conftest.py
+++ b/test_utils/conftest.py
@@ -361,16 +361,15 @@ def delete_df_collection(
create_main_accounts()
case DFCollectionType.WALL | DFCollectionType.SESSION:
- with thl_web_rw.make_connection() as conn:
- with conn.cursor() as c:
- c.execute("SET CONSTRAINTS ALL DEFERRED")
- for table in [
- "thl_wall",
- "thl_session",
- ]:
- c.execute(
- query=f"DELETE FROM {table};",
- )
+ with thl_web_rw.make_connection() as conn, conn.cursor() as c:
+ c.execute("SET CONSTRAINTS ALL DEFERRED")
+ for table in [
+ "thl_wall",
+ "thl_session",
+ ]:
+ c.execute(
+ query=f"DELETE FROM {table};",
+ )
case DFCollectionType.USER:
for table in ["thl_usermetadata", "thl_user"]: