Opened 5 years ago

Closed 5 years ago

#30410 closed New feature (wontfix)

Allow silencing "Adding permission ..." for tests

Reported by: Martin H. Owned by: nobody
Component: Testing framework Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In our automated tests, the "Adding permission xxx" lines are congesting the test output. IMHO there should be a way to disable them, at least for tests.

I refer to the following line of code: https://github.com/django/django/blob/181fb60159e54d442d3610f4afba6f066a6dac05/django/contrib/auth/management/__init__.py#L86

Change History (1)

comment:1 by Simon Charette, 5 years ago

Resolution: wontfix
Status: newclosed

Unless I'm missing something these messages will only be displayed during tests if --verbosity=3 as the test command calls migrate with verbosity - 1 and these messages are only displayed if verbosity >=2 just like content type creation message.

Given --verbosity=3 is the maximum level and should be synonym of print everything I don't think adding an extra test option to disable these particular messages is worth it. If you really want to disable them during tests only you could unregister the post_migrate signals in your test runner class setup with one that always pass a different verbosity.

Note: See TracTickets for help on using tickets.
Back to Top