forked from rc/aircox
!112 Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: rc/aircox#113
This commit is contained in:
@ -24,7 +24,7 @@ class TestSchedule:
|
||||
@pytest.mark.django_db
|
||||
def test_tz(self, schedules):
|
||||
for schedule in schedules:
|
||||
assert schedule.timezone == schedule.tz.zone
|
||||
assert schedule.timezone == schedule.tz.key
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_start(self, schedules):
|
||||
@ -45,7 +45,7 @@ class TestSchedule:
|
||||
def test_normalize(self, schedules):
|
||||
for schedule in schedules:
|
||||
dt = datetime.combine(schedule.date, schedule.time)
|
||||
assert schedule.normalize(dt).tzinfo.zone == schedule.timezone
|
||||
assert schedule.normalize(dt).tzinfo.key == schedule.timezone
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_dates_of_month_ponctual(self):
|
||||
@ -117,7 +117,7 @@ class TestSchedule:
|
||||
assert dt.month == at.month
|
||||
assert dt.weekday() == schedule.date.weekday()
|
||||
assert dt.time() == schedule.time
|
||||
assert dt.tzinfo.zone == schedule.timezone
|
||||
assert dt.tzinfo.key == schedule.timezone
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_diffusions_of_month(self, sched_initials):
|
||||
|
Reference in New Issue
Block a user