def assert_mail_count(count, msg=None):
 from django.core import mail
 if (msg is None):
  msg = u', '.join([e.subject for e in mail.outbox])
  msg = (u'%d != %d %s' % (len(mail.outbox), count, msg))
 assert_equals(len(mail.outbox), count, msg)

def assert_mail_count ( count , msg = None ) : from django . core import mail if ( msg is None ) : msg = u', ' . join ( [ e . subject for e in mail . outbox ] ) msg = ( u'%d != %d %s' % ( len ( mail . outbox ) , count , msg ) ) assert_equals ( len ( mail . outbox ) , count , msg )
assert the number of emails sent .