-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accept multiple addresses per calendar account
- Loading branch information
Showing
10 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
[[work]] | ||
path = ~/.calendars/work/ | ||
readonly = True | ||
address = [email protected] | ||
addresses = [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ def coll_vdirs(tmpdir) -> CollVdirType: | |
color='dark blue', | ||
priority=10, | ||
ctype='calendar', | ||
address='[email protected]', | ||
addresses='[email protected]', | ||
) | ||
vdirs[name] = Vdir(path, '.ics') | ||
coll = CalendarCollection(calendars=calendars, dbpath=':memory:', locale=LOCALE_BERLIN) | ||
|
@@ -73,7 +73,7 @@ def coll_vdirs_birthday(tmpdir): | |
readonly = True if name == 'a_calendar' else False | ||
calendars[name] = {'name': name, 'path': path, 'color': 'dark blue', | ||
'readonly': readonly, 'unicode_symbols': True, 'ctype': 'birthdays', | ||
'address': '[email protected]'} | ||
'addresses': '[email protected]'} | ||
vdirs[name] = Vdir(path, '.vcf') | ||
coll = CalendarCollection(calendars=calendars, dbpath=':memory:', locale=LOCALE_BERLIN) | ||
coll.default_calendar_name = cal1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -332,8 +332,8 @@ def test_status_confirmed(): | |
FORMAT_CALENDAR = ('{calendar-color}{status-symbol}{start-end-time-style} ({calendar}) ' | ||
'{title} [{location}]{repeat-symbol}') | ||
|
||
assert event.format(FORMAT_CALENDAR, dt.date(2014, 4, 9)) == \ | ||
' ✔09:30-10:30 (foobar) An Event []\x1b[0m' | ||
assert human_formatter(FORMAT_CALENDAR)(event.attributes(dt.date(2014, 4, 9))) == \ | ||
'✔09:30-10:30 (foobar) An Event []\x1b[0m' | ||
|
||
def test_event_d_long(): | ||
event_d_long = _get_text('event_d_long') | ||
|
@@ -696,29 +696,29 @@ def test_partstat(): | |
) | ||
|
||
event = Event.fromString( | ||
_get_text('event_dt_partstat'), address='[email protected]', **EVENT_KWARGS) | ||
_get_text('event_dt_partstat'), addresses=['[email protected]'], **EVENT_KWARGS) | ||
assert event.partstat == 'ACCEPTED' | ||
assert human_formatter(FORMAT_CALENDAR)(event.attributes(dt.date(2014, 4, 9))) == \ | ||
'✔09:30-10:30 (foobar) An Event []\x1b[0m' | ||
|
||
event = Event.fromString( | ||
_get_text('event_dt_partstat'), address='[email protected]', **EVENT_KWARGS) | ||
_get_text('event_dt_partstat'), addresses=['[email protected]'], **EVENT_KWARGS) | ||
assert event.partstat == 'DECLINED' | ||
assert human_formatter(FORMAT_CALENDAR)(event.attributes(dt.date(2014, 4, 9))) == \ | ||
'❌09:30-10:30 (foobar) An Event []\x1b[0m' | ||
|
||
event = Event.fromString( | ||
_get_text('event_dt_partstat'), address='[email protected]', **EVENT_KWARGS) | ||
_get_text('event_dt_partstat'), addresses=['[email protected]'], **EVENT_KWARGS) | ||
assert event.partstat == 'ACCEPTED' | ||
assert human_formatter(FORMAT_CALENDAR)(event.attributes(dt.date(2014, 4, 9))) == \ | ||
'✔09:30-10:30 (foobar) An Event []\x1b[0m' | ||
|
||
@pytest.mark.xfail | ||
def test_partstat_deligated(): | ||
event = Event.fromString( | ||
_get_text('event_dt_partstat'), address='[email protected]', **EVENT_KWARGS) | ||
_get_text('event_dt_partstat'), addresses=['[email protected]'], **EVENT_KWARGS) | ||
assert event.partstat == 'ACCEPTED' | ||
|
||
event = Event.fromString( | ||
_get_text('event_dt_partstat'), address='[email protected]', **EVENT_KWARGS) | ||
_get_text('event_dt_partstat'), addresses=['[email protected]'], **EVENT_KWARGS) | ||
assert event.partstat == 'ACCEPTED' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,11 +42,11 @@ def test_simple_config(self): | |
'calendars': { | ||
'home': { | ||
'path': os.path.expanduser('~/.calendars/home/'), 'readonly': False, | ||
'color': None, 'priority': 10, 'type': 'calendar', 'address': '', | ||
'color': None, 'priority': 10, 'type': 'calendar', 'addresses': [''], | ||
}, | ||
'work': { | ||
'path': os.path.expanduser('~/.calendars/work/'), 'readonly': False, | ||
'color': None, 'priority': 10, 'type': 'calendar', 'address': '', | ||
'color': None, 'priority': 10, 'type': 'calendar', 'addresses': [''], | ||
}, | ||
}, | ||
'sqlite': {'path': os.path.expanduser('~/.local/share/khal/khal.db')}, | ||
|
@@ -83,10 +83,10 @@ def test_small(self): | |
'calendars': { | ||
'home': {'path': os.path.expanduser('~/.calendars/home/'), | ||
'color': 'dark green', 'readonly': False, 'priority': 20, | ||
'type': 'calendar', 'address': ''}, | ||
'type': 'calendar', 'addresses': ['']}, | ||
'work': {'path': os.path.expanduser('~/.calendars/work/'), | ||
'readonly': True, 'color': None, 'priority': 10, | ||
'type': 'calendar', 'address': '[email protected]'}}, | ||
'type': 'calendar', 'addresses': ['[email protected]']}}, | ||
'sqlite': {'path': os.path.expanduser('~/.local/share/khal/khal.db')}, | ||
'locale': { | ||
'local_timezone': get_localzone(), | ||
|