Merge pull request #417 from sartography/email-data-script-487
get_email_data bug #487
This commit is contained in:
commit
aeaacaf21f
|
@ -16,7 +16,8 @@ class EmailData(Script):
|
|||
if 'email_id' in kwargs or 'workflow_spec_id' in kwargs:
|
||||
subject = 'My Test Email'
|
||||
recipients = 'user@example.com'
|
||||
content, content_html = EmailService().get_rendered_content(task.task_spec.documentation, task.data)
|
||||
content = "Hello"
|
||||
content_html = "<!DOCTYPE html><html><head></head><body><div><h2>Hello</h2></div></body></html>"
|
||||
email_model = EmailModel(subject=subject,
|
||||
recipients=recipients,
|
||||
content=content,
|
||||
|
|
|
@ -6,6 +6,12 @@ from crc.services.email_service import EmailService
|
|||
|
||||
class TestGetEmailData(BaseTest):
|
||||
|
||||
def test_email_data_validation(self):
|
||||
self.load_example_data()
|
||||
spec_model = self.load_test_spec('get_email_data')
|
||||
rv = self.app.get('/v1.0/workflow-specification/%s/validate' % spec_model.id, headers=self.logged_in_headers())
|
||||
self.assertEqual([], rv.json)
|
||||
|
||||
def test_get_email_data_by_email_id(self):
|
||||
self.load_example_data()
|
||||
workflow = self.create_workflow('get_email_data')
|
||||
|
|
Loading…
Reference in New Issue