我在项目中创建了多个unit_test文件。当我独立运行所有测试文件时,所有文件都通过所有测试用例。TypeError: 'NoneType' object is not callable.======================================================================
ERROR [0.001s]: test_create_pull_requests (test_custom_logs_manager.Test
因此,我模拟了postie.postmail,并将异常作为其调用的效果放在一边:def test_send_mail_FalseNo handlers could be found for logger "outbox"现在,我想模拟记录器,并检查在“EmailDeliveryException”情况下是否也调用了错误函数