Skip to content

Commit 5bfb817

Browse files
committed
test: fixing ox breakages
Some tests were broken for ox, which doesn't support searching for old events. Fix it properly rather than skipping the tests.
1 parent 228d5a9 commit 5bfb817

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/test_caldav.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,10 +1272,13 @@ def testCreateEventFromiCal(self, klass):
12721272
## Calendar.new() is supported from icalendar 7, which is yet to be released as of 2025-09
12731273
pytest.skip("Newer icalendar version required")
12741274

1275+
## Use a near-future date so servers with a "sliding window" (e.g. OX) can find the event
1276+
start = datetime.now() + timedelta(days=30)
1277+
end = start + timedelta(hours=1)
12751278
icalevent = icalendar.Event.new(
12761279
uid="ctuid1",
1277-
start=datetime(2015, 10, 10, 8, 7, 6),
1278-
end=datetime(2015, 10, 10, 9, 7, 6),
1280+
start=start,
1281+
end=end,
12791282
summary="This is a test event",
12801283
)
12811284
icalcal.add_component(icalevent)

0 commit comments

Comments
 (0)