Merge pull request #412 from sartography/remove-content-html-512
Remove content_html #512
This commit is contained in:
commit
fb25404a90
|
@ -26,5 +26,5 @@ class EmailModelSchema(ma.Schema):
|
|||
|
||||
class Meta:
|
||||
model = EmailModel
|
||||
fields = ["id", "subject", "sender", "recipients", "cc", "bcc", "content", "content_html",
|
||||
fields = ["id", "subject", "sender", "recipients", "cc", "bcc", "content",
|
||||
"study_id", "timestamp", "workflow_spec_id"]
|
||||
|
|
|
@ -51,6 +51,9 @@ class TestEmailScript(BaseTest):
|
|||
# Make sure timestamp is UTC
|
||||
self.assertEqual(db_emails[0].timestamp.tzinfo, datetime.timezone.utc)
|
||||
|
||||
# Make sure we remove content_html from the returned email_model
|
||||
self.assertNotIn('content_html', workflow_api.next_task.data['email_model'])
|
||||
|
||||
@patch('crc.services.email_service.EmailService.add_email')
|
||||
def test_email_raises_exception(self, mock_response):
|
||||
self.load_example_data()
|
||||
|
|
|
@ -32,6 +32,8 @@ class TestGetEmailData(BaseTest):
|
|||
self.assertEqual('My Email Subject', email_data[0]['subject'])
|
||||
self.assertEqual('sender@example.com', email_data[0]['sender'])
|
||||
self.assertEqual('[\'joe@example.com\']', email_data[0]['recipients'])
|
||||
# Make sure we remove content_html from email_data
|
||||
self.assertNotIn('content_html', email_data[0])
|
||||
|
||||
def test_get_email_data_by_workflow_spec_id(self):
|
||||
self.load_example_data()
|
||||
|
|
Loading…
Reference in New Issue