Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade email functionality in Oppia to have email attachments #21380

Merged
merged 9 commits into from
Dec 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes lint issues
  • Loading branch information
Nik-09 committed Dec 7, 2024
commit 09026c5428d2ae0199f17e344f5feac2755c0ef7
8 changes: 5 additions & 3 deletions core/platform/email/mailgun_email_services_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_send_email_to_mailgun_without_bcc_reply_to_and_recipients(
mock_post.return_value = mock_response

sender_email = 'a@a.com'
recipient_emails = 'b@b.com'
recipient_emails = ['b@b.com']
subject = 'Hola 😂 - invitation to collaborate'
plaintext_body = 'plaintext_body 😂'
html_body = 'Hi abc,<br> 😂'
Expand Down Expand Up @@ -99,7 +99,8 @@ def test_send_email_to_mailgun_without_bcc_reply_to_and_recipients(
self.assertTrue(resp)

@patch("requests.post")
def test_send_email_to_mailgun_with_file_attachments(self, mock_post):
def test_send_email_to_mailgun_with_file_attachments(
self, mock_post: Mock) -> None:
mock_response = Mock()
mock_response.status_code = 200
mock_post.return_value = mock_response
Expand Down Expand Up @@ -142,7 +143,8 @@ def test_send_email_to_mailgun_with_file_attachments(self, mock_post):
self.assertEqual(kwargs['files'][0][1][0], 'test_file.txt')

@patch("requests.post")
def test_send_email_to_mailgun_with_bcc_and_recipient(self, mock_post) -> None:
def test_send_email_to_mailgun_with_bcc_and_recipient(
self, mock_post:Mock) -> None:
# Test sending email with single bcc and single recipient email.
mock_response = Mock()
mock_response.status_code = 200
Expand Down