Skip to content

Commit ea13299

Browse files
committed
Remove all usage of url field
It's part of the standard, but calendar software tends to ignore it, preferring the `location` field.
1 parent 9338867 commit ea13299

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

example/test_calendar.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ events:
5050
# All-day event
5151
- summary: Earth Day
5252
begin: 2021-04-22
53-
url: https://earthday.org
53+
location: https://earthday.org
5454
repeat:
5555
interval:
5656
# seconds, minutes, hours, days, weeks, months, years

tests/test_calendar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_calendar_event():
2424
events:
2525
- summary: Earth Day
2626
begin: 2021-04-22
27-
url: https://earthday.org
27+
location: https://earthday.org
2828
location: Earth
2929
"""
3030
)

tests/test_events.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ def test_basic_structure():
1111
"""
1212
summary: Earth Day
1313
begin: 2021-04-22
14-
url: https://earthday.org
15-
location: Earth
14+
location: https://earthday.org
1615
"""
1716
)
1817
)
@@ -23,8 +22,7 @@ def test_basic_structure():
2322
for line in lines[:-1]:
2423
assert line.endswith("\r")
2524
assert "SUMMARY:Earth Day" in event_str
26-
assert "URL:https://earthday.org" in event_str
27-
assert "LOCATION:Earth" in event_str
25+
assert "LOCATION:https://earthday.org" in event_str
2826
# All events must have a DTSTAMP
2927
assert "DTSTAMP" in event_str
3028

@@ -35,7 +33,7 @@ def test_all_day_event():
3533
"""
3634
summary: Earth Day
3735
begin: 2021-04-22
38-
url: https://earthday.org
36+
location: https://earthday.org
3937
"""
4038
)
4139
)
@@ -53,7 +51,6 @@ def test_rrule():
5351
"""
5452
summary: Earth Day
5553
begin: 2021-04-22
56-
url: https://earthday.org
5754
repeat:
5855
interval:
5956
years: 1
@@ -139,7 +136,6 @@ def test_event_with_custom_ics():
139136
"""
140137
summary: Earth Day
141138
begin: 2021-04-22
142-
url: https://earthday.org
143139
ics: |
144140
RRULE:FREQ=YEARLY;UNTIL=20280422T000000
145141
"""

0 commit comments

Comments
 (0)