Opened 7 years ago
Closed 7 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
Note:
See TracTickets
for help on using tickets.
Unless I'm missing something these messages will only be displayed during tests if
--verbosity=3as the test command callsmigratewithverbosity - 1and these messages are only displayed if verbosity >=2 just like content type creation message.Given
--verbosity=3is 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 thepost_migratesignals in your test runner class setup with one that always pass a differentverbosity.