Skip to content

Commit c805fcd

Browse files
committed
improve stop
1 parent 264502c commit c805fcd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_django/live_server_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class CustomLiveServerTestCase(LiveServerTestCase):
2525
self._dj_testcase.setUpClass()
2626

2727
def stop(self):
28-
self._dj_testcase._live_server_modified_settings.enable()
28+
if not hasattr(self._dj_testcase._live_server_modified_settings, "wrapped"):
29+
self._dj_testcase._live_server_modified_settings.enable()
2930
self._dj_testcase.tearDownClass()
3031

3132
@property

0 commit comments

Comments
 (0)