-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,12 +248,39 @@ def test_vcal_fixups(self): | |
DESCRIPTION:Reminder | ||
END:VALARM | ||
END:VEVENT | ||
END:VCALENDAR""", ## next has a completed date. It should be a timestamp according to the RFC | ||
"""BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:-//Example Corp.//CalDAV Client//EN | ||
BEGIN:VTODO | ||
UID:[email protected] | ||
DTSTAMP:20070313T123432Z | ||
COMPLETED;VALUE=DATE:20070501 | ||
SUMMARY:Submit Quebec Income Tax Return for 2006 | ||
CLASS:CONFIDENTIAL | ||
CATEGORIES:FAMILY,FINANCE | ||
STATUS:NEEDS-ACTION | ||
END:VTODO | ||
END:VCALENDAR""", ## Again, but implicit instead of explicit date | ||
"""BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:-//Example Corp.//CalDAV Client//EN | ||
BEGIN:VTODO | ||
UID:[email protected] | ||
DTSTAMP:20070313T123432Z | ||
COMPLETED:20070501 | ||
SUMMARY:Submit Quebec Income Tax Return for 2006 | ||
CLASS:CONFIDENTIAL | ||
CATEGORIES:FAMILY,FINANCE | ||
STATUS:NEEDS-ACTION | ||
END:VTODO | ||
END:VCALENDAR""", | ||
] ## todo: add more broken ical here | ||
|
||
for ical in broken_ical: | ||
## This should raise error | ||
with pytest.raises(vobject.base.ValidateError): | ||
# with pytest.raises(vobject.base.ValidateError): | ||
with pytest.raises(Exception): | ||
vobject.readOne(ical).serialize() | ||
## This should not raise error | ||
vobject.readOne(vcal.fix(ical)).serialize() | ||
|