summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdam Zapletal <adamzap@gmail.com>2025-01-25 12:18:34 -0600
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-27 09:24:59 +0100
commitb285cc787ecfd6d8305ee9c8cb84edbf95e59f36 (patch)
treee052414d33d17631c23b060c126833a0b12c9be3 /tests
parente9576c0aa86186e25b92c3c4f6b1bd7f20799db9 (diff)
[5.2.x] Captured stderr during admin_docs test.
The admindocs app doesn't pass a log level to docutils when it parses reStructured Text, so system messages can be logged during parsing. Backport of 9a71eca64bd3a357ef4846d81668d690089779c7 from main.
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_docs/test_views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/admin_docs/test_views.py b/tests/admin_docs/test_views.py
index 11b70d6cd9..bec555bd44 100644
--- a/tests/admin_docs/test_views.py
+++ b/tests/admin_docs/test_views.py
@@ -509,7 +509,8 @@ class TestModelDetailView(TestDataMixin, AdminDocsTestCase):
codename="change_person", content_type=person_content_type
)
staff_user.user_permissions.add(view_company, change_person)
- response_for_person = self.client.get(person_url)
+ with captured_stderr():
+ response_for_person = self.client.get(person_url)
response_for_company = self.client.get(company_url)
# View or change permission grants access.
self.assertEqual(response_for_person.status_code, 200)