Example #1
0
 def test_EmailResponse_generateResponse_withInReplyTo(self):
     response = autoresponder.generateResponse(self.fromAddr,
                                               self.clientAddr,
                                               self.body,
                                               messageID="NSA")
     contents = str(response.readContents()).replace('\x00', '')
     self.assertIsInstance(response.mailfile, (io.BytesIO, io.StringIO))
     self.assertSubstring("In-Reply-To: NSA", contents)
Example #2
0
 def test_EmailResponse_generateResponse_readContents(self):
     response = autoresponder.generateResponse(self.fromAddr,
                                               self.clientAddr, self.body)
     contents = str(response.readContents()).replace('\x00', '')
     self.assertSubstring('timey-wimey, wibbly-warbly... stuff.', contents)
Example #3
0
 def test_EmailResponse_generateResponse_noSafelog(self):
     autoresponder.safelog.safe_logging = False
     response = autoresponder.generateResponse(self.fromAddr,
                                               self.clientAddr, self.body)
     self.assertIsInstance(response, autoresponder.EmailResponse)
Example #4
0
 def test_EmailResponse_generateResponse_mailfile(self):
     response = autoresponder.generateResponse(self.fromAddr,
                                               self.clientAddr, self.body)
     self.assertIsInstance(response.mailfile, (io.BytesIO, io.StringIO))
Example #5
0
 def test_EmailResponse_generateResponse(self):
     response = autoresponder.generateResponse(self.fromAddr,
                                               self.clientAddr, self.body)
     self.assertIsInstance(response, autoresponder.EmailResponse)