Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test restructure issue 100 184 #408

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN:VEVENT
SUMMARY;LANGUAGE=ru:te
END:VEVENT
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN:VEVENT
DTSTART:20150219T133000
DTSTAMP:20150219T133000
UID:1234567
RDATE;VALUE=PERIOD:20150219T133000/PT10H
END:VEVENT
29 changes: 0 additions & 29 deletions src/icalendar/tests/test_fixed_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,6 @@ def test_issue_82(self):
b"VALUE=BINARY:dGV4dA==\r\nEND:VEVENT\r\n"
)

def test_issue_100(self):
"""Issue #100 - Transformed doctests into unittests, Test fixes and
cleanup.
https://github.com/collective/icalendar/pull/100
"""

ical_content = "BEGIN:VEVENT\r\nSUMMARY;LANGUAGE=ru:te\r\nEND:VEVENT"
icalendar.Event.from_ical(ical_content).to_ical()

def test_issue_101(self):
"""Issue #101 - icalendar is choking on umlauts in ORGANIZER

Expand Down Expand Up @@ -397,26 +388,6 @@ def test_issue_178(self):
b'BEGIN:VEVENT\r\nDTSTART:20150122\r\nUID:12345\r\n'
b'END:VEVENT\r\nEND:MYCOMPTOO\r\n')

def test_issue_184(self):
"""Issue #184 - Previous changes in code broke already broken
representation of PERIOD values - in a new way"""

ical_str = ['BEGIN:VEVENT',
'DTSTAMP:20150219T133000',
'DTSTART:20150219T133000',
'UID:1234567',
'RDATE;VALUE=PERIOD:20150219T133000/PT10H',
'END:VEVENT']

event = icalendar.Event.from_ical('\r\n'.join(ical_str))
self.assertEqual(event.errors, [])
self.assertEqual(event.to_ical(),
b'BEGIN:VEVENT\r\nDTSTART:20150219T133000\r\n'
b'DTSTAMP:20150219T133000\r\nUID:1234567\r\n'
b'RDATE;VALUE=PERIOD:20150219T133000/PT10H\r\n'
b'END:VEVENT\r\n'
)

def test_issue_237(self):
"""Issue #237 - Fail to parse timezone with non-ascii TZID"""

Expand Down
12 changes: 12 additions & 0 deletions src/icalendar/tests/test_parsing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
'''Tests checking that parsing works'''
import pytest

@pytest.mark.parametrize('event_name', [
# https://github.com/collective/icalendar/pull/100
('issue_100_transformed_doctests_into_unittests'),
('issue_184_broken_representation_of_period'),
])
def test_event_to_ical_is_inverse_of_from_ical(events, event_name):
event = getattr(events, event_name)
assert event.to_ical() == event.raw_ics

def test_description_parsed_properly_issue_53(events):
'''Issue #53 - Parsing failure on some descriptions?

Expand Down