Fixes in tests and html escaping
This commit is contained in:
parent
9e1e48e0e9
commit
61a2d53308
10 changed files with 77 additions and 22 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from settings import config
|
||||
from paramecio.citoplasma import sendmail
|
||||
import time
|
||||
import unittest
|
||||
|
||||
class TestFieldMethods(unittest.TestCase):
|
||||
|
|
@ -8,10 +9,14 @@ class TestFieldMethods(unittest.TestCase):
|
|||
|
||||
s=sendmail.SendMail()
|
||||
|
||||
self.assertTrue( s.send(config.portal_email, config.email_test, 'This is a test', 'A message for test a simple email method', content_type='plain', attachments=[]) )
|
||||
self.assertTrue( s.send(config.portal_email, [config.email_test], 'This is a test', 'A message for test a simple email method', content_type='plain', attachments=[]) )
|
||||
|
||||
self.assertTrue( s.send(config.portal_email, config.email_test, 'This is a test', 'A message for test a simple email method in <b>html</b>', content_type='html', attachments=[]) )
|
||||
time.sleep(70)
|
||||
|
||||
self.assertTrue( s.send(config.portal_email, config.email_test, 'This is a test', 'A message for test a simple email method in <b>html</b> and attachments', content_type='html', attachments=['tests/images/image.jpg']) )
|
||||
self.assertTrue( s.send(config.portal_email, [config.email_test], 'This is a test', 'A message for test a simple email method in <b>html</b>', content_type='html', attachments=[]) )
|
||||
|
||||
s.quit()
|
||||
time.sleep(70)
|
||||
|
||||
self.assertTrue( s.send(config.portal_email, [config.email_test], 'This is a test', 'A message for test a simple email method in <b>html</b> and attachments', content_type='html', attachments=['tests/images/image.jpg']) )
|
||||
|
||||
s.quit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue