Пример #1
0
 def test_outlook_com_with_rtf_response_stripped(self):
     text = u'outlook.com (new hotmail) with RTF on \n\nSubject: "Posting a question by email." \nFrom: [email protected] \nTo: [email protected] \nDate: Thu, 1 Nov 2012 16:30:27 +0000'
     self.assertEqual(
         mail.extract_reply(text),
         'outlook.com (new hotmail) with RTF on'
     )
     self.assertEqual(
         mail.extract_reply(text),
         'outlook.com (new hotmail) with RTF on'
     )
Пример #2
0
 def test_outlook_com_with_rtf_response_stripped(self):
     text = u'outlook.com (new hotmail) with RTF on \n\nSubject: "Posting a question by email." \nFrom: [email protected] \nTo: [email protected] \nDate: Thu, 1 Nov 2012 16:30:27 +0000'
     self.assertEqual(
         mail.extract_reply(text),
         'outlook.com (new hotmail) with RTF on'
     )
     self.assertEqual(
         mail.extract_reply(text),
         'outlook.com (new hotmail) with RTF on'
     )
    def test_some_other(self):
        text = """some real text

-------- Original message --------
From: [email protected] [mailto:[email protected]] 
Sent: Wednesday, August 07, 2013 11:00 AM
To: Jane Doe
Subject: "One more test question from email."

"""
        self.assertEqual(mail.extract_reply(text), "some real text")
Пример #4
0
    def test_some_other(self):
        text = """some real text

-------- Original message --------
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 07, 2013 11:00 AM
To: Jane Doe
Subject: "One more test question from email."

"""
        self.assertEqual(mail.extract_reply(text), "some real text")
Пример #5
0
    def test_blackberry(self):

        text = """Lorem ipsum lorem ipsum
blah blah blah

some more text here

Joe

________________________________________
From: [email protected]
Sent: Thursday, August 15, 2013 1:58:21 AM
To: Mister Joe
Subject: Our forum: "some text in the subject line"
"""
        expected = """Lorem ipsum lorem ipsum
blah blah blah

some more text here

Joe"""
        self.assertEqual(mail.extract_reply(text), expected)
    def test_blackberry(self):

        text = """Lorem ipsum lorem ipsum
blah blah blah

some more text here

Joe

________________________________________
From: [email protected]
Sent: Thursday, August 15, 2013 1:58:21 AM
To: Mister Joe
Subject: Our forum: "some text in the subject line"
"""
        expected = """Lorem ipsum lorem ipsum
blah blah blah

some more text here

Joe"""
        self.assertEqual(mail.extract_reply(text), expected)
Пример #7
0
 def test_some_other1(self):
     text = 'some text here\n\n\n-------- Original message --------\nFrom: [email protected]\nDate:12/15/2013 2:35 AM (GMT-05:00)\nTo: Some One\nSubject: some subject\n\n\n\n'
     self.assertEqual(mail.extract_reply(text), 'some text here')
Пример #8
0
 def test_outlook_com_plain_text_response_stripped(self):
     text = 'reply from hotmail without RTF \n________________________________ \n> Subject: "test with recovered signature" \n> From: [email protected] \n> To: [email protected] \n> Date: Thu, 1 Nov 2012 16:44:35 +0000'
     self.assertEqual(mail.extract_reply(text),
                      'reply from hotmail without RTF')
Пример #9
0
 def test_kmail_plain_text_response_stripped(self):
     text = 'On Monday 01 October 2012 21:22:44 you wrote: \n\nthis is my reply!'
     self.assertEqual(mail.extract_reply(text), 'this is my reply!')
Пример #10
0
 def test_yahoo_mail_response_stripped(self):
     text = '\n\nthis is my reply!\n\n\n\n________________________________\n From: "*****@*****.**" <*****@*****.**>\nTo: [email protected] \nSent: Wednesday, October 31, 2012 2:41 AM\nSubject: "This is my test question"\n \n\n  \n \n \n'
     self.assertEqual(mail.extract_reply(text), 'this is my reply!')
Пример #11
0
 def test_gmail_plain_text_response_stripped(self):
     text = '\n\nthis is my another reply!\n\nOn Wed, Oct 31, 2012 at 1:45 AM, <*****@*****.**> wrote:\n>\n> '
     self.assertEqual(mail.extract_reply(text), 'this is my another reply!')
Пример #12
0
 def test_outlook_com_plain_text_response_stripped(self):
     text = u'reply from hotmail without RTF \n________________________________ \n> Subject: "test with recovered signature" \n> From: [email protected] \n> To: [email protected] \n> Date: Thu, 1 Nov 2012 16:44:35 +0000'
     self.assertEqual(
         mail.extract_reply(text),
         u'reply from hotmail without RTF'
     )
 def test_gmail_rich_text_response_stripped(self):
     text = u"\n\nthis is my reply!\n\nOn Wed, Oct 31, 2012 at 1:45 AM, <*****@*****.**> wrote:\n\n> **\n>            "
     self.assertEqual(mail.extract_reply(text), "this is my reply!")
Пример #14
0
 def test_kmail_plain_text_response_stripped(self):
     text = u'On Monday 01 October 2012 21:22:44 you wrote: \n\nthis is my reply!'
     self.assertEqual(mail.extract_reply(text), 'this is my reply!')
Пример #15
0
 def test_yahoo_mail_response_stripped(self):
     text = u'\n\nthis is my reply!\n\n\n\n________________________________\n From: "*****@*****.**" <*****@*****.**>\nTo: [email protected] \nSent: Wednesday, October 31, 2012 2:41 AM\nSubject: "This is my test question"\n \n\n  \n \n \n'
     self.assertEqual(mail.extract_reply(text), 'this is my reply!')
Пример #16
0
 def test_gmail_plain_text_response_stripped(self):
     text = u'\n\nthis is my another reply!\n\nOn Wed, Oct 31, 2012 at 1:45 AM, <*****@*****.**> wrote:\n>\n> '
     self.assertEqual(mail.extract_reply(text), 'this is my another reply!')
 def test_some_other1(self):
     text = "some text here\n\n\n-------- Original message --------\nFrom: [email protected]\nDate:12/15/2013 2:35 AM (GMT-05:00)\nTo: Some One\nSubject: some subject\n\n\n\n"
     self.assertEqual(mail.extract_reply(text), "some text here")