def test_valid_user_id(self): """If a valid user_id is given, send a rejection email.""" user = UserProfileFactory.create(user__email='*****@*****.**').user send_rejection_email(user.id) eq_(len(mail.outbox), 1) eq_(mail.outbox[0].to, ['*****@*****.**'])
def process_deletion(vimeo_id, user_id): vimeo.delete_video(vimeo_id) send_rejection_email(user_id)
def test_invalid_user_id(self): """If the given user_id is invalid, do not send mail.""" send_rejection_email(999999999999) eq_(len(mail.outbox), 0)