Skip to content

Commit

Permalink
Convert to naive timezone before formatting with template_date
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys0dev committed Oct 6, 2024
1 parent 1d1bc1e commit 81c6c99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cl/favorites/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django.template.defaultfilters import date as template_date
from django.test import AsyncClient, override_settings
from django.urls import reverse
from django.utils.timezone import now
from django.utils.timezone import make_naive, now
from selenium.webdriver.common.by import By
from timeout_decorator import timeout_decorator

Expand Down Expand Up @@ -925,7 +925,7 @@ async def test_prayers_integration(self) -> None:
email_text_content,
)
self.assertIn(
f"You requested it on {template_date(prayer_1.date_created, 'M j, Y')}",
f"You requested it on {template_date(make_naive(prayer_1.date_created), 'M j, Y')}",
email_text_content,
)
self.assertIn(
Expand All @@ -946,7 +946,7 @@ async def test_prayers_integration(self) -> None:
html_content,
)
self.assertIn(
f"You requested it on {template_date(prayer_1.date_created, 'M j, Y')}",
f"You requested it on {template_date(make_naive(prayer_1.date_created), 'M j, Y')}",
html_content,
)
self.assertIn(
Expand Down

0 comments on commit 81c6c99

Please sign in to comment.