Skip to content

Commit

Permalink
Fixed actual Django compatibility issues from test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart van der Schoor committed Feb 28, 2024
1 parent 8e1b40d commit 1ec693a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/test_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from django.core import mail
from django.test import TestCase, override_settings
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from mail_editor.helpers import find_template

Expand Down
12 changes: 6 additions & 6 deletions tests/test_template_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_simple(self):

subject, body = template.render(body_context, subj_context=subject_context)

self.assertEquals(subject, "Important message for 111")
self.assertEqual(subject, "Important message for 111")
self.assertIn("Test mail sent from testcase with 111", body)

@override_settings(MAIL_EDITOR_CONF=CONFIG, MAIL_EDITOR_BASE_CONTEXT={"id": "BASE"})
Expand All @@ -53,7 +53,7 @@ def test_base_context(self):

subject, body = template.render(body_context, subj_context=subject_context)

self.assertEquals(subject, "Important message for BASE")
self.assertEqual(subject, "Important message for BASE")
self.assertIn("Test mail sent from testcase with BASE", body)

@override_settings(
Expand All @@ -68,7 +68,7 @@ def test_dynamic_context(self):

subject, body = template.render(body_context, subj_context=subject_context)

self.assertEquals(subject, "Important message for DYNAMIC")
self.assertEqual(subject, "Important message for DYNAMIC")
self.assertIn("Test mail sent from testcase with DYNAMIC", body)

@override_settings(MAIL_EDITOR_CONF=CONFIG)
Expand All @@ -81,7 +81,7 @@ def test_incorrect_base_path(self):

subject, body = template.render(body_context, subj_context=subject_context)

self.assertEquals(subject, "Important message for 222")
self.assertEqual(subject, "Important message for 222")
self.assertIn("Test mail sent from testcase with 222", body)

@override_settings(MAIL_EDITOR_CONF=CONFIG)
Expand All @@ -98,7 +98,7 @@ def test_base_template_errors(self):

subject, body = template.render(body_context, subj_context=subject_context)

self.assertEquals(subject, "Important message for 333")
self.assertEqual(subject, "Important message for 333")
self.assertIn("Test mail sent from testcase with 333", body)

@override_settings(MAIL_EDITOR_CONF=CONFIG)
Expand All @@ -110,6 +110,6 @@ def test_render_preview(self):
subject, body = template.render(body_context, subj_context=subject_context)

# rendered placeholder
self.assertEquals(subject, "Important message for --id--")
self.assertEqual(subject, "Important message for --id--")
# rendered example
self.assertIn("Test mail sent from testcase with 321", body)

0 comments on commit 1ec693a

Please sign in to comment.