Skip to content

Commit

Permalink
fix: use tearDownClass
Browse files Browse the repository at this point in the history
  • Loading branch information
skoob13 committed Dec 16, 2024
1 parent 1f993e8 commit 448daa3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions posthog/test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,9 @@ def _execute_migration_with_snapshots(self, executor):
def setUpBeforeMigration(self, apps):
pass

def tearDown(self):
super().tearDown() # type: ignore
@classmethod
def tearDownClass(cls):
super().tearDownClass() # type: ignore
executor = MigrationExecutor(connection) # Reset Django's migration state
targets = executor.loader.graph.leaf_nodes()
executor.migrate(targets) # Migrate to the latest migration
Expand Down

0 comments on commit 448daa3

Please sign in to comment.