How to set up site e-mail configuration for tests

I have a method on a class that send an e-mail, it works. Now I want to create tests. How can I set up site configuration for testing this unit?

Thanks

https://docs.plone.org/external/plone.app.dexterity/docs/testing/mock-testing.html

There is a Mock Mailhost testing Layer which you can use as base of your testing Layer. See https://github.com/plone/plone.app.testing/blob/master/docs/README.rst#mock-mailhost