Skip to content

Commit

Permalink
Fix failing test with date_in_near_future hard coded
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Sep 11, 2023
1 parent 64783c8 commit eda25f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ynr/apps/elections/tests/test_ballot_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
OrganizationFactory,
PostFactory,
)
from django.template.defaultfilters import date
from django.utils.html import escape
from django_webtest import WebTest
from elections.filters import (
Expand Down Expand Up @@ -130,8 +131,9 @@ def test_ballot_with_candidates_no_sopn(self):

self.assertEqual(response.context["candidates"].count(), 9)
self.assertDataTimelineCandidateAddingInProgress(response)

self.assertInHTML(
"<h1>Candidates for Bar Ward on <br>7 September 2023</h1>",
f"<h1>Candidates for Bar Ward on <br>{date(date_in_near_future, 'j F Y')}</h1>",
response.text,
)
self.assertInHTML(
Expand Down

0 comments on commit eda25f6

Please sign in to comment.