mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Used addCleanup() in tests where appropriate.
This commit is contained in:
@@ -52,10 +52,8 @@ class URLTestCaseBase(SimpleTestCase):
|
||||
def setUp(self):
|
||||
# Make sure the cache is empty before we are doing our tests.
|
||||
clear_url_caches()
|
||||
|
||||
def tearDown(self):
|
||||
# Make sure we will leave an empty cache for other testcases.
|
||||
clear_url_caches()
|
||||
self.addCleanup(clear_url_caches)
|
||||
|
||||
|
||||
class URLPrefixTests(URLTestCaseBase):
|
||||
|
||||
Reference in New Issue
Block a user