-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #581 from ennamarie19/master
Add fixes for OSS-Fuzz bugs and test cases
- Loading branch information
Showing
5 changed files
with
57 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""This file collects errors that the OSS FUZZ build has found.""" | ||
from datetime import time | ||
from icalendar import Calendar | ||
from icalendar.prop import vDDDLists | ||
|
||
import pytest | ||
|
||
|
||
def test_stack_is_empty(): | ||
"""If we get passed an invalid string, we expect to get a ValueError.""" | ||
with pytest.raises(ValueError): | ||
Calendar.from_ical("END:CALENDAR") | ||
|
||
|
||
def test_vdd_list_type_mismatch(): | ||
"""If we pass in a string type, we expect it to be converted to bytes""" | ||
vddd_list = vDDDLists([time(hour=6, minute=6, second=6)]) | ||
assert vddd_list.to_ical() == b'060606' |