File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,6 @@ def _django_db_helper(
165165 django_db_setup : None ,
166166 django_db_blocker : DjangoDbBlocker ,
167167) -> Generator [None , None , None ]:
168- from django import VERSION
169-
170168 if is_django_unittest (request ):
171169 yield
172170 return
@@ -240,13 +238,9 @@ class PytestDjangoTestCase(test_case_class): # type: ignore[misc,valid-type]
240238 @classmethod
241239 def setUpClass (cls ) -> None :
242240 super (django .test .TestCase , cls ).setUpClass ()
243- if VERSION < (4 , 1 ):
244- django .db .transaction .Atomic ._ensure_durability = False
245241
246242 @classmethod
247243 def tearDownClass (cls ) -> None :
248- if VERSION < (4 , 1 ):
249- django .db .transaction .Atomic ._ensure_durability = True
250244 super (django .test .TestCase , cls ).tearDownClass ()
251245
252246 PytestDjangoTestCase .setUpClass ()
@@ -260,8 +254,7 @@ def tearDownClass(cls) -> None:
260254
261255 PytestDjangoTestCase .tearDownClass ()
262256
263- if VERSION >= (4 , 0 ):
264- PytestDjangoTestCase .doClassCleanups ()
257+ PytestDjangoTestCase .doClassCleanups ()
265258
266259 django_db_blocker .restore ()
267260
You can’t perform that action at this time.
0 commit comments