| 1 |
"""This file tests the issue 61. |
| 2 |
|
| 3 |
See https://github.com/niccokunzmann/python-recurring-ical-events/issues/61 |
| 4 |
|
| 5 |
We expect DATE as the value. |
| 6 |
|
| 7 |
DTSTART;VALUE=DATE:20211215 |
| 8 |
DTEND;VALUE=DATE:20211216 |
| 9 |
|
| 10 |
""" |
| 11 |
|
| 12 |
import datetime |
| 13 |
|
| 14 |
from pytz import timezone |
| 15 |
|
| 16 |
|
| 17 |
def test_sequence_is_not_present(calendars): |
| 18 |
tz = str(calendars.raw.issue_61_time_zone_error.get("X-WR-TIMEZONE")) |
| 19 |
now = timezone(tz).localize( |
| 20 |
datetime.datetime(2021, 12, 15, 17, 41, 1, 446354) |
| 21 |
) |
| 22 |
events = calendars.issue_61_time_zone_error.at(now) |
| 23 |
assert len(events) == 1 |
| 24 |
assert isinstance(events[0]["DTSTART"].dt, datetime.date) |