Merge pull request #412 from sartography/remove-content-html-512

Remove content_html #512
This commit is contained in:
Dan Funk 2021-11-01 15:38:46 -04:00 committed by GitHub
commit fb25404a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -26,5 +26,5 @@ class EmailModelSchema(ma.Schema):
class Meta: class Meta:
model = EmailModel 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"] "study_id", "timestamp", "workflow_spec_id"]

View File

@ -51,6 +51,9 @@ class TestEmailScript(BaseTest):
# Make sure timestamp is UTC # Make sure timestamp is UTC
self.assertEqual(db_emails[0].timestamp.tzinfo, datetime.timezone.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') @patch('crc.services.email_service.EmailService.add_email')
def test_email_raises_exception(self, mock_response): def test_email_raises_exception(self, mock_response):
self.load_example_data() self.load_example_data()

View File

@ -32,6 +32,8 @@ class TestGetEmailData(BaseTest):
self.assertEqual('My Email Subject', email_data[0]['subject']) self.assertEqual('My Email Subject', email_data[0]['subject'])
self.assertEqual('sender@example.com', email_data[0]['sender']) self.assertEqual('sender@example.com', email_data[0]['sender'])
self.assertEqual('[\'joe@example.com\']', email_data[0]['recipients']) 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): def test_get_email_data_by_workflow_spec_id(self):
self.load_example_data() self.load_example_data()