Ticket #18 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Patch — Test mode for use of TurboMail in unit tests.

Reported by: fs Owned by: amcgregor
Priority: normal Milestone: 2.1
Component: tests Version: 2.0.4
Keywords: patch Cc:

Description

In unit tests the interaction of your code under test with the environment should be minimal. If your code sends emails via TurboMail this is a problem as TurboMail will try to contact an external mailserver.

The attached patch introduces a new parameter "mail.testmode" (default: False). If the parameter is set to True, TurboMail will just keep all sent mails in its queue where you can access them with turbomail._queue._queue.get().

Attachments

testmode.patch (4.7 kB) - added by fs 1 year ago.
guide_testmode_doc.patch (1.4 kB) - added by fs 1 year ago.
documentation for the new testmode parameter in the TurboMail guide (apply after the patch for #19)

Change History

Changed 1 year ago by fs

Changed 1 year ago by fs

documentation for the new testmode parameter in the TurboMail guide (apply after the patch for #19)

Changed 1 year ago by amcgregor

  • status changed from new to closed
  • resolution set to fixed

Both patches applied as of r26.

Changed 1 year ago by amcgregor

For some reason the test suite did not get added to the correct directory. Fixed in r27.

Changed 1 year ago by amcgregor

  • summary changed from new feature: testmode for use of TurboMail in unit tests to Test mode for use of TurboMail in unit tests.
  • milestone set to 2.0.5

Changed 1 year ago by amcgregor

  • keywords patch added
  • summary changed from Test mode for use of TurboMail in unit tests. to Test mode for use of TurboMail in unit tests. — Patch

Changed 1 year ago by amcgregor

  • summary changed from Test mode for use of TurboMail in unit tests. — Patch to Patch — Test mode for use of TurboMail in unit tests.
Note: See TracTickets for help on using tickets.