Skip to content

Commit

Permalink
Captured stderr during admin_docs test.
Browse files Browse the repository at this point in the history
The admindocs app doesn't pass a log level to docutils when it parses
reStructured Text, so system messages can be logged during parsing.
  • Loading branch information
adamzap authored and sarahboyce committed Jan 27, 2025
1 parent 330d89d commit 9a71eca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/admin_docs/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ def test_model_permission_denied(self):
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)
Expand Down

0 comments on commit 9a71eca

Please sign in to comment.