Message377951
I'm not sure my patch completely resolved this issue. I'm adding Antoine re the OP's question about the assertLogs API.
> Doing so would make the test over-specific and fragile. The requirement is > that a warning be logged, not that a specific logger issue the warning.
My view is that your test is fragile because it just asks "was anything logged" without checking the log message. The docs show how to verify that the log message is what you expect it to be. |
|
Date |
User |
Action |
Args |
2020-10-04 15:51:13 | iritkatriel | set | recipients:
+ iritkatriel, vinay.sajip, pitrou, miss-islington, udalrich.schermer |
2020-10-04 15:51:13 | iritkatriel | set | messageid: <1601826673.74.0.182250157017.issue41898@roundup.psfhosted.org> |
2020-10-04 15:51:13 | iritkatriel | link | issue41898 messages |
2020-10-04 15:51:13 | iritkatriel | create | |
|