mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Used addCleanup() in tests where appropriate.
This commit is contained in:
@@ -460,9 +460,7 @@ class YearLteTests(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
models.DateField.register_lookup(YearTransform)
|
||||
|
||||
def tearDown(self):
|
||||
models.DateField._unregister_lookup(YearTransform)
|
||||
self.addCleanup(models.DateField._unregister_lookup, YearTransform)
|
||||
|
||||
@unittest.skipUnless(
|
||||
connection.vendor == "postgresql", "PostgreSQL specific SQL used"
|
||||
|
||||
Reference in New Issue
Block a user