kopia lustrzana https://github.com/collective/icalendar
commit
ae7d35ca7d
|
@ -60,7 +60,7 @@ _marker = []
|
|||
class Component(CaselessDict):
|
||||
"""Component is the base object for calendar, Event and the other
|
||||
components defined in RFC 2445. normally you will not use this class
|
||||
directy, but rather one of the subclasses.
|
||||
directly, but rather one of the subclasses.
|
||||
"""
|
||||
|
||||
name = None # should be defined in each component
|
||||
|
@ -91,7 +91,7 @@ class Component(CaselessDict):
|
|||
#
|
||||
# If the parser is too strict it might prevent parsing erroneous but
|
||||
# otherwise compliant properties. So the parser is pretty lax, but it is
|
||||
# possible to test for non-complience by calling this method.
|
||||
# possible to test for non-compliance by calling this method.
|
||||
# """
|
||||
# return name in not_compliant
|
||||
|
||||
|
@ -254,7 +254,7 @@ class Component(CaselessDict):
|
|||
return vals
|
||||
|
||||
def set_inline(self, name, values, encode=1):
|
||||
"""Converts a list of values into comma seperated string and sets value
|
||||
"""Converts a list of values into comma separated string and sets value
|
||||
to that.
|
||||
"""
|
||||
if encode:
|
||||
|
|
|
@ -153,7 +153,7 @@ END:VEVENT"""
|
|||
icalendar.Event.from_ical(ical_content).to_ical()
|
||||
|
||||
def test_issue_101(self):
|
||||
"""Issue #101 - icalender is choking on umlauts in ORGANIZER
|
||||
"""Issue #101 - icalendar is choking on umlauts in ORGANIZER
|
||||
|
||||
https://github.com/collective/icalendar/issues/101
|
||||
"""
|
||||
|
|
|
@ -65,7 +65,7 @@ class IcalendarTestCase (unittest.TestCase):
|
|||
# character sequence of BACKSLASH, followed by a LATIN SMALL LETTER
|
||||
# N or a LATIN CAPITAL LETTER N, that is "\n" or "\N".
|
||||
|
||||
# Newlines are not allwoed in content lines
|
||||
# Newlines are not allowed in content lines
|
||||
self.assertRaises(AssertionError, Contentline, b'1234\r\n\r\n1234')
|
||||
|
||||
self.assertEqual(
|
||||
|
|
|
@ -115,11 +115,11 @@ class TestPropertyParams(unittest.TestCase):
|
|||
self.assertEqual(p['parameter1'], 'Value1')
|
||||
self.assertEqual(p['PARAMETER1'], 'Value1')
|
||||
|
||||
# Parameter with list of values must be seperated by comma
|
||||
# Parameter with list of values must be separated by comma
|
||||
p = Parameters({'parameter1': ['Value1', 'Value2']})
|
||||
self.assertEqual(p.to_ical(), b'PARAMETER1=Value1,Value2')
|
||||
|
||||
# Multiple parameters must be seperated by a semicolon
|
||||
# Multiple parameters must be separated by a semicolon
|
||||
p = Parameters({'RSVP': 'TRUE', 'ROLE': 'REQ-PARTICIPANT'})
|
||||
self.assertEqual(p.to_ical(), b'ROLE=REQ-PARTICIPANT;RSVP=TRUE')
|
||||
|
||||
|
@ -127,7 +127,7 @@ class TestPropertyParams(unittest.TestCase):
|
|||
p = Parameters({'ALTREP': 'http://www.wiz.org'})
|
||||
self.assertEqual(p.to_ical(), b'ALTREP="http://www.wiz.org"')
|
||||
|
||||
# list items must be quoted seperately
|
||||
# list items must be quoted separately
|
||||
p = Parameters({'MEMBER': ['MAILTO:projectA@host.com',
|
||||
'MAILTO:projectB@host.com']})
|
||||
self.assertEqual(
|
||||
|
@ -175,7 +175,7 @@ class TestPropertyParams(unittest.TestCase):
|
|||
|
||||
def test_parse_and_access_property_params(self):
|
||||
"""Parse an ics string and access some property parameters then.
|
||||
This is a follow-up of a question recieved per email.
|
||||
This is a follow-up of a question received per email.
|
||||
|
||||
"""
|
||||
ics = """BEGIN:VCALENDAR
|
||||
|
|
|
@ -96,7 +96,7 @@ class TestCalComponent(unittest.TestCase):
|
|||
b'BEGIN:VCALENDAR\r\nATTENDEE:Max M\r\nEND:VCALENDAR\r\n'
|
||||
)
|
||||
|
||||
# Components can be nested, so You can add a subcompont. Eg a calendar
|
||||
# Components can be nested, so You can add a subcomponent. Eg a calendar
|
||||
# holds events.
|
||||
e = Component(summary='A brief history of time')
|
||||
e.name = 'VEVENT'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# we save all timezone with TZIDs unknow to the TZDB in here
|
||||
# we save all timezone with TZIDs unknown to the TZDB in here
|
||||
_timezone_cache = {}
|
||||
|
|
Ładowanie…
Reference in New Issue