'Test email notifications'

def test_email(self):

    email_notifier = EmailNotifier()
    legacy_test_emails = 'email-1@address.com,email2@address.org,email_3@address.tv'
    test_emails = 'email-4@address.com,email5@address.org,email_6@address.tv'
    for show in self.legacy_shows:
        showid = self._get_showid_by_showname(show.name)
        self.mydb.action('UPDATE    tv_shows    SET    notify_list    =    ?    WHERE    show_id    =    ?', [legacy_test_emails, showid])
    for show in self.shows:
        showid = self._get_showid_by_showname(show.name)
        Home.saveShowNotifyList(show=showid, emails=test_emails)
    shows = (self.legacy_shows + self.shows)
    for show in shows:
        for episode in show.episodes:
            ep_name = ss((episode._format_pattern('%SN    -    %Sx%0E    -    %EN    -    ') + episode.quality))
            show_name = email_notifier._parseEp(ep_name)
            recipients = email_notifier._generate_recipients(show_name)
            self._debug_spew((((('-    Email    Notifications    for    ' + show.name) + '    (episode:    ') + episode.name) + ')    will    be    sent    to:'))
            for email in recipients:
                self._debug_spew(('--    ' + email.strip()))
            self._debug_spew('\n\r')
    return True
