mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Previously, this command would reliably fail: ``` tools/test-backend --skip-provision-check --parallel=3 zerver.tests.test_email_log.EmailLogTest.test_forward_address_details zerver.tests.test_email_log.EmailLogTest.test_generate_and_clear_email_log zerver.tests.test_example.TestDevelopmentEmailsLog ``` and now it reliably succeeds. :-) After hours of fiddling/googling/hair-tearing, I found that mocking-away Django Connection.send_messages() was the best: - We're testing Zulip and not Django. - Mocking at this lower level exercises more of our code. - EmailLogBackEnd._do_send_messages() helper method added to simplify mocking. Fixes #21925.
22 KiB
22 KiB