mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-30 13:49:56 +00:00
fix localdate issues
This commit is contained in:
committed by
Bartuccio Antoine
parent
271d57051e
commit
0eaa20e09d
@@ -19,7 +19,7 @@ from django.core.cache import cache
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from django.utils.timezone import localtime, now
|
||||
from django.utils.timezone import localdate, localtime, now
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from club.forms import MailingForm
|
||||
@@ -109,7 +109,7 @@ class TestMembershipQuerySet(TestClub):
|
||||
|
||||
def test_ongoing_with_membership_ending_today(self):
|
||||
"""Test that a membership ending the present day is considered as ended."""
|
||||
today = timezone.now().date()
|
||||
today = localdate()
|
||||
self.richard.memberships.filter(club=self.club).update(end_date=today)
|
||||
current_members = list(self.club.members.ongoing().order_by("id"))
|
||||
expected = [
|
||||
|
Reference in New Issue
Block a user