aboutsummaryrefslogtreecommitdiff
path: root/test_utils/conftest.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-27 14:53:28 -0700
committerMax Nanis2026-08-27 14:53:28 -0700
commitfdc170938ac4ac8fa5d9d4df1936e6dc0777f291 (patch)
tree5f812593c126abe631f57280cd38578f089b81b2 /test_utils/conftest.py
parentcf239865ce440e1a71ee2360514eaeb018620ac9 (diff)
downloadgeneralresearch-fdc170938ac4ac8fa5d9d4df1936e6dc0777f291.tar.gz
generalresearch-fdc170938ac4ac8fa5d9d4df1936e6dc0777f291.zip
Ruff morning! Excluding thl_django in toml file
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"]: