diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-06-08 11:34:30 -0400 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-06-08 13:04:01 -0400 |
| commit | 7f2afdd0f6a872ccb48d7fbdaacce9b11216af52 (patch) | |
| tree | 7bb5a39e2e60a7aea6807e4dd695f96b61d31743 | |
| parent | 59a89d1008ab9220275fbdcff2a44d9bbd920032 (diff) | |
Refs #23929 -- Fixed test setup in CreateDefaultSiteTests.
| -rw-r--r-- | tests/sites_tests/tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/sites_tests/tests.py b/tests/sites_tests/tests.py index 32bc8f65f9..686ff289d1 100644 --- a/tests/sites_tests/tests.py +++ b/tests/sites_tests/tests.py @@ -270,8 +270,9 @@ class CreateDefaultSiteTests(TestCase): @classmethod def setUpTestData(cls): - # Delete the site created as part of the default migration process. - Site.objects.all().delete() + # Delete the sites created in post_migrate signals on test db creation. + for using in cls.databases: + Site.objects.all().using(using).delete() def setUp(self): self.app_config = apps.get_app_config("sites") |
