Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Oct 2, 2023
1 parent 924c6ee commit d16c491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lacommunaute/pages/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from django.utils.dateformat import format
from django.utils.timezone import localdate
from faker import Faker
from machina.core.loading import get_class
Expand Down Expand Up @@ -80,7 +81,7 @@ def test_month_datas_in_context(self):
uniq_engaged_visitors = StatFactory(name="nb_uniq_engaged_visitors", period=Period.MONTH, date=today)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context["period"], today.strftime("%B %Y"))
self.assertEqual(response.context["period"], format(today, "F Y"))
self.assertEqual(response.context["nb_uniq_visitors"], uniq_visitors.value)
self.assertEqual(response.context["nb_uniq_active_visitors"], uniq_active_visitors.value)
self.assertEqual(response.context["nb_uniq_engaged_visitors"], uniq_engaged_visitors.value)
Expand Down

0 comments on commit d16c491

Please sign in to comment.