Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Sep 11, 2023
1 parent 5237256 commit b9e19ba
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ureport/polls/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,11 @@ def test_contact_activity_counters(self):
self.assertFalse(ContactActivity.objects.filter(org=self.nigeria, contact="contact-uuid"))
self.assertFalse(ContactActivityCounter.objects.filter(org=self.nigeria))

result_date = date(2022, 9, 15)
current_year = timezone.now().year
next_year = current_year + 1
eight_years_ago = current_year - 8

result_date = date(next_year, 9, 15)

PollResult.objects.create(
org=self.nigeria,
Expand Down Expand Up @@ -2201,7 +2205,7 @@ def test_contact_activity_counters(self):
category="Yes",
text="Yeah",
completed=False,
born=2015,
born=eight_years_ago,
gender="M",
date=result_date,
state="R-LAGOS",
Expand All @@ -2218,7 +2222,7 @@ def test_contact_activity_counters(self):
category="Yes",
text="Yeah",
completed=False,
born=2015,
born=eight_years_ago,
gender="M",
date=result_date,
state="R-ABUJA",
Expand All @@ -2235,7 +2239,7 @@ def test_contact_activity_counters(self):
category="Yes",
text="Yeah",
completed=False,
born=2015,
born=eight_years_ago,
gender="F",
date=result_date,
state="R-LAGOS",
Expand Down

0 comments on commit b9e19ba

Please sign in to comment.