mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Used addCleanup() in tests where appropriate.
This commit is contained in:
@@ -27,9 +27,7 @@ class SitesFrameworkTests(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
Site.objects.clear_cache()
|
||||
|
||||
def tearDown(self):
|
||||
Site.objects.clear_cache()
|
||||
self.addCleanup(Site.objects.clear_cache)
|
||||
|
||||
def test_site_manager(self):
|
||||
# Make sure that get_current() does not return a deleted Site object.
|
||||
|
||||
Reference in New Issue
Block a user