Firts upload
This commit is contained in:
commit
fae5555503
184 changed files with 19239 additions and 0 deletions
25
tests/sendmailtest.py
Normal file
25
tests/sendmailtest.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from settings import config
|
||||
from cuchulu.libraries import sendmail
|
||||
import time
|
||||
import unittest
|
||||
|
||||
class TestFieldMethods(unittest.TestCase):
|
||||
|
||||
def test_sendmail(self):
|
||||
|
||||
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=[]) )
|
||||
|
||||
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 in <b>html</b>', content_type='html', attachments=[]) )
|
||||
|
||||
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 in <b>html</b> and attachments', content_type='html', attachments=['tests/images/image.jpg']) )
|
||||
|
||||
#s.quit()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue