Пример #1
0
    def test_email_notifier__build_name_with_no_user(self):
        config = CFG.get_instance()
        config.EMAIL_NOTIFICATION_FROM_DEFAULT_LABEL = 'Robot'
        config.EMAIL_NOTIFICATION_FROM_EMAIL = '*****@*****.**'

        notifier = EmailNotifier(smtp_config=None, global_config=config)
        email = notifier._get_sender()
        eq_('Robot <*****@*****.**>', email)
Пример #2
0
    def test_email_notifier__build_name_with_no_user(self):
        config = CFG.get_instance()
        config.EMAIL_NOTIFICATION_FROM_DEFAULT_LABEL = 'Robot'
        config.EMAIL_NOTIFICATION_FROM_EMAIL = '*****@*****.**'

        notifier = EmailNotifier(smtp_config=None, global_config=config)
        email = notifier._get_sender()
        eq_('Robot <*****@*****.**>', email)
Пример #3
0
    def test_email_notifier__build_name_without_user_id(self):
        u = User()
        u.user_id = 3
        u.display_name = 'François Michâlié'

        config = CFG.get_instance()
        config.EMAIL_NOTIFICATION_FROM_EMAIL = '*****@*****.**'

        notifier = EmailNotifier(smtp_config=None, global_config=config)
        email = notifier._get_sender(user=u)
        eq_('=?utf-8?q?Fran=C3=A7ois_Mich=C3=A2li=C3=A9_via_Tracim?= <*****@*****.**>', email)  # nopep8