From fe9c920881930aedc1b1629b1a2f7ca5fca7bbed Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Thu, 2 Feb 2023 12:53:36 -0400 Subject: [PATCH] test: Set DateField to a date, not a datetime, in factory --- ietf/group/factories.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ietf/group/factories.py b/ietf/group/factories.py index 0a3f7b6db8..d56fcf7212 100644 --- a/ietf/group/factories.py +++ b/ietf/group/factories.py @@ -10,6 +10,8 @@ from ietf.group.models import Group, Role, GroupEvent, GroupMilestone, \ GroupHistory, RoleHistory from ietf.review.factories import ReviewTeamSettingsFactory +from ietf.utils.timezone import date_today + class GroupFactory(factory.django.DjangoModelFactory): class Meta: @@ -68,7 +70,7 @@ class Meta: class DatedGroupMilestoneFactory(BaseGroupMilestoneFactory): group = factory.SubFactory(GroupFactory, uses_milestone_dates=True) - due = timezone.now()+datetime.timedelta(days=180) + due = date_today() + datetime.timedelta(days=180) class DatelessGroupMilestoneFactory(BaseGroupMilestoneFactory): group = factory.SubFactory(GroupFactory, uses_milestone_dates=False)