Exemple #1
0
    def test_email_without_precedence_header_isnt_treated_as_auto_reply(self):
        payload = "Sample payload"

        # This message is legitimate except for the precedence header.
        # An exception is not expected when processing it.
        msg1 = MIMEText("%s1" % payload)
        msg1["Subject"] = "Proposal gleda raspored"
        msg1["From"] = self.betty.email
        msg1["To"] = "*****@*****.**>" % self.bettysorg.slug

        self.assertFalse(is_autoreply(msg1))
    def test_email_without_precedence_header_isnt_treated_as_auto_reply(self):
        payload = "Sample payload"

        # This message is legitimate except for the precedence header.
        # An exception is not expected when processing it.
        msg1 = MIMEText("%s1" % payload)
        msg1['Subject'] = 'Proposal gleda raspored'
        msg1['From'] = self.betty.email
        msg1['To'] = '*****@*****.**>' % self.bettysorg.slug

        self.assertFalse(is_autoreply(msg1))
 def test_email_with_precedence_header_auto_reply_is_treated_as_auto_reply(self):
     payload = "Sample payload"
     
     # This message is legitimate except for the precedence header.
     # An exception is not expected when processing it. 
     msg1 = MIMEText("%s1" % payload)
     msg1['Subject'] = 'Proposal gleda raspored'
     msg1['From'] = self.betty.email
     msg1['To'] = '*****@*****.**>' % self.bettysorg.slug
     msg1['Precedence'] = 'auto_reply'
     
     self.assertTrue(is_autoreply(msg1))