From 448daa37b9cb260d56237d6c37d412b1aecdfa21 Mon Sep 17 00:00:00 2001 From: Georgiy Tarasov Date: Mon, 16 Dec 2024 14:43:07 +0100 Subject: [PATCH] fix: use tearDownClass --- posthog/test/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posthog/test/base.py b/posthog/test/base.py index 934a4eb99b48a..a8a06dcf3e480 100644 --- a/posthog/test/base.py +++ b/posthog/test/base.py @@ -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