Skip to content

Commit

Permalink
Fixed #1758 -- Removed usage of internal Python API
Browse files Browse the repository at this point in the history
  • Loading branch information
bmispelon committed Nov 30, 2024
1 parent 132af0b commit d605495
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blog/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from contextlib import redirect_stderr
from datetime import timedelta
from test.support import captured_stderr
from io import StringIO

from django.test import TestCase
from django.urls import reverse
Expand Down Expand Up @@ -64,7 +65,7 @@ def test_docutils_safe(self):
"""
Make sure docutils' file inclusion directives are disabled by default.
"""
with captured_stderr() as self.docutils_stderr:
with redirect_stderr(StringIO()):
entry = Entry.objects.create(
pub_date=self.now,
is_active=True,
Expand Down

0 comments on commit d605495

Please sign in to comment.