summaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2024-11-24 15:56:49 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2024-11-30 17:39:22 +0100
commitd60549523362663a550844155c9a8ec77e635736 (patch)
tree8b22ea66c4f962a5345b1476f4f988e0b6465a0b /blog
parent132af0b38c6c8dbd8e9da720bc1618eaf710f24b (diff)
Fixed #1758 -- Removed usage of internal Python API
Diffstat (limited to 'blog')
-rw-r--r--blog/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/blog/tests.py b/blog/tests.py
index 23eed4e6..e14a70fb 100644
--- a/blog/tests.py
+++ b/blog/tests.py
@@ -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
@@ -64,7 +65,7 @@ class EntryTestCase(DateTimeMixin, TestCase):
"""
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,