All tests working now
This commit is contained in:
parent
61a2d53308
commit
0ac685d223
2 changed files with 9 additions and 5 deletions
|
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
from paramecio.cromosoma.coreforms import BaseForm
|
from paramecio.cromosoma.coreforms import BaseForm
|
||||||
from paramecio.citoplasma.i18n import I18n
|
from paramecio.citoplasma.i18n import I18n
|
||||||
from paramecio.citoplasma.mtemplates import standard_t
|
from paramecio.citoplasma.mtemplates import env_theme, PTemplate
|
||||||
|
|
||||||
|
env=env_theme(__file__)
|
||||||
|
|
||||||
|
t=PTemplate(env)
|
||||||
|
|
||||||
class I18nForm(BaseForm):
|
class I18nForm(BaseForm):
|
||||||
|
|
||||||
|
|
@ -16,4 +20,4 @@ class I18nForm(BaseForm):
|
||||||
|
|
||||||
lang_selected=I18n.get_default_lang()
|
lang_selected=I18n.get_default_lang()
|
||||||
|
|
||||||
return standard_t.load_template('forms/i18nform.phtml', name_form=self.name, form=self.form_child, arr_i18n=I18n.dict_i18n, lang_selected=lang_selected)
|
return t.load_template('forms/i18nform.phtml', name_form=self.name, form=self.form_child, arr_i18n=I18n.dict_i18n, lang_selected=lang_selected)
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ class TestFieldMethods(unittest.TestCase):
|
||||||
|
|
||||||
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=[]) )
|
||||||
|
|
||||||
time.sleep(70)
|
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=[]) )
|
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)
|
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']) )
|
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()
|
#s.quit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue