Skip to content

Commit

Permalink
(fix): Do not truncate views
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneTR committed Oct 23, 2024
1 parent df6eee0 commit 92b3e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def pytest_generate_tests(metafunc):
@pytest.fixture(autouse=True)
def cleanup_after_test():
yield
tables = DB().fetch_all("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'")
tables = DB().fetch_all("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type != 'VIEW'")
for table in tables:
table_name = table[0]
DB().query(f'TRUNCATE TABLE "{table_name}" RESTART IDENTITY CASCADE')
Expand Down

0 comments on commit 92b3e36

Please sign in to comment.