Skip to content

Instantly share code, notes, and snippets.

@jgeewax
Created August 20, 2010 23:08
Show Gist options
  • Save jgeewax/541378 to your computer and use it in GitHub Desktop.
Save jgeewax/541378 to your computer and use it in GitHub Desktop.
import unittest
from gaetestbed import MailTestCase
class MyTestCase(unittest.TestCase, MailTestCase):
def test_email_sent(self):
# Do something that sends an e-mail
send_email_to('test@example.org')
# Check that the e-mail was sent to somebody
self.assertEmailSent(to='test@example.org')
self.assertEqual(len(self.get_sent_messages()), 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment